SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
Linda Null ,julia Lobur
Chapter:
Data Representation In Computer Systems
Exercise:
Exercises
Question:15 | ISBN:9780763704445 | Edition: 3

Question

15. Use the double-dabble method to convert 102123 directly to decimal. (Hint: you have to change the multiplier.)

TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Answer

To convert the number 102123 to decimal using the double-dabble method, follow these steps:

  1. Start with the binary representation of the number, which is 0001 0000 0010 0001 0010 0011 in binary.

  2. Initialize a multiplier with the value of 5 (in decimal). This is because we are dealing with 6 digits, so we will be multiplying by 5, 4, 3, 2, 1, and 0 in successive iterations.

  3. Perform the double-dabble algorithm:

    • Starting from the leftmost bit, shift each bit to the left by 1 position.
    • If the shifted bit is greater than or equal to 5 (the current multiplier), add 3 to the shifted bit.
    • Repeat this process for each bit, moving from left to right.
  4. After performing the double-dabble algorithm, the binary representation becomes: 0000 0001 0000 0000 0000 0100 in binary.

  5. Convert the binary representation to decimal:

    • Group the bits into sets of 4, starting from the rightmost side.
    • Convert each set of 4 bits to decimal.
    • The decimal representation of the binary number is 10004.

Therefore, the decimal representation of 102123 is 10004 using the double-dabble method.

0 0

Discussions

Post the discussion to improve the above solution.