Matches in DBpedia 2016-04 for { <http://dbpedia.org/resource/Double_dabble> ?p ?o }
Showing triples 1 to 33 of
33
with 100 triples per page.
- Double_dabble abstract "In computer science, the double dabble algorithm is used to convert binary numbers into binary-coded decimal (BCD) notation. It is also known as the shift-and-add-3 algorithm, and can be implemented using a small number of gates in computer hardware, but at the expense of high latency. The algorithm operates as follows:Suppose the original number to be converted is stored in a register that is n bits wide. Reserve a scratch space wide enough to hold both the original number and its BCD representation; 4×ceil(n/3) bits will be enough. It takes a maximum of 4 bits in binary to store each decimal digit.Then partition the scratch space into BCD digits (on the left) and the original register (on the right). For example, if the original number to be converted is eight bits wide, the scratch space would be partitioned as follows:100s Tens Ones Original0010 0100 0011 11110011The diagram above shows the binary representation of 24310 in the original register, and the BCD representation of 243 on the left.The scratch space is initialized to all zeros, and then the value to be converted is copied into the \"original register\" space on the right.0000 0000 0000 11110011The algorithm then iterates n times. On each iteration, the entire scratch space is left-shifted one bit. However, before the left-shift is done, any BCD digit which is greater than 4 is incremented by 3. The increment ensures that a value of 5, incremented and left-shifted, becomes 16, thus correctly \"carrying\" into the next BCD digit.The double-dabble algorithm, performed on the value 24310, looks like this:0000 0000 0000 11110011 Initialization0000 0000 0001 11100110 Shift0000 0000 0011 11001100 Shift0000 0000 0111 10011000 Shift0000 0000 1010 10011000 Add 3 to ONES, since it was 70000 0001 0101 00110000 Shift0000 0001 1000 00110000 Add 3 to ONES, since it was 50000 0011 0000 01100000 Shift0000 0110 0000 11000000 Shift0000 1001 0000 11000000 Add 3 to TENS, since it was 60001 0010 0001 10000000 Shift0010 0100 0011 00000000 Shift 2 4 3 BCDNow eight shifts have been performed, so the algorithm terminates. The BCD digits to the left of the \"original register\" space display the BCD encoding of the original value 243.Another example for the double dabble algorithm - value 6524410. 104 103 102 101 100 Original binary0000 0000 0000 0000 0000 1111111011011100 Initialization0000 0000 0000 0000 0001 1111110110111000 Shift left (1st)0000 0000 0000 0000 0011 1111101101110000 Shift left (2nd)0000 0000 0000 0000 0111 1111011011100000 Shift left (3rd)0000 0000 0000 0000 1010 1111011011100000 Add 3 to 100, since it was 70000 0000 0000 0001 0101 1110110111000000 Shift left (4th)0000 0000 0000 0001 1000 1110110111000000 Add 3 to 100, since it was 50000 0000 0000 0011 0001 1101101110000000 Shift left (5th)0000 0000 0000 0110 0011 1011011100000000 Shift left (6th)0000 0000 0000 1001 0011 1011011100000000 Add 3 to 101, since it was 60000 0000 0001 0010 0111 0110111000000000 Shift left (7th)0000 0000 0001 0010 1010 0110111000000000 Add 3 to 100, since it was 70000 0000 0010 0101 0100 1101110000000000 Shift left (8th)0000 0000 0010 1000 0100 1101110000000000 Add 3 to 101, since it was 50000 0000 0101 0000 1001 1011100000000000 Shift left (9th)0000 0000 1000 0000 1001 1011100000000000 Add 3 to 102, since it was 50000 0000 1000 0000 1100 1011100000000000 Add 3 to 100, since it was 90000 0001 0000 0001 1001 0111000000000000 Shift left (10th)0000 0001 0000 0001 1100 0111000000000000 Add 3 to 100, since it was 90000 0010 0000 0011 1000 1110000000000000 Shift left (11th)0000 0010 0000 0011 1011 1110000000000000 Add 3 to 100, since it was 80000 0100 0000 0111 0111 1100000000000000 Shift left (12th)0000 0100 0000 1010 0111 1100000000000000 Add 3 to 101, since it was 70000 0100 0000 1010 1010 1100000000000000 Add 3 to 100, since it was 70000 1000 0001 0101 0101 1000000000000000 Shift left (13th)0000 1011 0001 0101 0101 1000000000000000 Add 3 to 103, since it was 80000 1011 0001 1000 0101 1000000000000000 Add 3 to 101, since it was 50000 1011 0001 1000 1000 1000000000000000 Add 3 to 100, since it was 50001 0110 0011 0001 0001 0000000000000000 Shift left (14th)0001 1001 0011 0001 0001 0000000000000000 Add 3 to 103, since it was 60011 0010 0110 0010 0010 0000000000000000 Shift left (15th)0011 0010 1001 0010 0010 0000000000000000 Add 3 to 102, since it was 60110 0101 0010 0100 0100 0000000000000000 Shift left (16th) 6 5 2 4 4 BCDSixteen shifts have been performed, so the algorithm terminates. The BCD digits is: 6*104 + 5*103 + 2*102 + 4*101 + 4*100 = 65244.".
- Double_dabble wikiPageID "6459360".
- Double_dabble wikiPageLength "14681".
- Double_dabble wikiPageOutDegree "13".
- Double_dabble wikiPageRevisionID "698574465".
- Double_dabble wikiPageWikiLink Algorithm.
- Double_dabble wikiPageWikiLink Binary-coded_decimal.
- Double_dabble wikiPageWikiLink Binary_number.
- Double_dabble wikiPageWikiLink C_(programming_language).
- Double_dabble wikiPageWikiLink C_dynamic_memory_allocation.
- Double_dabble wikiPageWikiLink Category:Articles_with_example_C_code.
- Double_dabble wikiPageWikiLink Category:Binary_arithmetic.
- Double_dabble wikiPageWikiLink Category:Shift-and-add_algorithms.
- Double_dabble wikiPageWikiLink Computer_science.
- Double_dabble wikiPageWikiLink Latency_(engineering).
- Double_dabble wikiPageWikiLink Pedagogy.
- Double_dabble wikiPageWikiLink Processor_register.
- Double_dabble wikiPageWikiLink Shift-and-add_algorithm.
- Double_dabble wikiPageWikiLinkText "Double dabble".
- Double_dabble wikiPageUsesTemplate Template:Math.
- Double_dabble wikiPageUsesTemplate Template:Reflist.
- Double_dabble subject Category:Articles_with_example_C_code.
- Double_dabble subject Category:Binary_arithmetic.
- Double_dabble subject Category:Shift-and-add_algorithms.
- Double_dabble type Algorithm.
- Double_dabble comment "In computer science, the double dabble algorithm is used to convert binary numbers into binary-coded decimal (BCD) notation. It is also known as the shift-and-add-3 algorithm, and can be implemented using a small number of gates in computer hardware, but at the expense of high latency. The algorithm operates as follows:Suppose the original number to be converted is stored in a register that is n bits wide.".
- Double_dabble label "Double dabble".
- Double_dabble sameAs Q3037514.
- Double_dabble sameAs Double_dabble.
- Double_dabble sameAs m.0g65pm.
- Double_dabble sameAs Q3037514.
- Double_dabble wasDerivedFrom Double_dabble?oldid=698574465.
- Double_dabble isPrimaryTopicOf Double_dabble.