Question

In: Computer Science

Convert the following numbers as indicated. show steps. Use as few digits in the results as...

Convert the following numbers as indicated. show steps. Use as few digits in the results as necessary or as many as indicated in the problems (note: don't use HEX table lookup).
a) (010010111)2 to Base 10
b) (-76)10 to binary 2's complement representation using 9 bits
c) (67.4375)10 to unsigned binary
d) (-53)10 to hexadecimal 2’s complement representation

Solutions

Expert Solution

a)
Converting 010010111 to decimal
010010111
=> 0x2^8+1x2^7+0x2^6+0x2^5+1x2^4+0x2^3+1x2^2+1x2^1+1x2^0
=> 0x256+1x128+0x64+0x32+1x16+0x8+1x4+1x2+1x1
=> 0+128+0+0+16+0+4+2+1
=> 151
Answer: 151

b)
-76
This is negative. so, follow these steps to convert this into a 2's complement binary
Step 1:
Divide 76 successively by 2 until the quotient is 0
   > 76/2 = 38, remainder is 0
   > 38/2 = 19, remainder is 0
   > 19/2 = 9, remainder is 1
   > 9/2 = 4, remainder is 1
   > 4/2 = 2, remainder is 0
   > 2/2 = 1, remainder is 0
   > 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 1001100
So, 76 of decimal is 1001100 in binary
So, 76 in normal binary is 001001100
Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0.
   001001100 is flipped to 110110011
Step 3:. Add 1 to above result
110110011 + 1 = 110110100
so, -76 in 2's complement binary is 110110100

c)
Converting 67.4375 to binary
Convert decimal part first, then the fractional part
> First convert 67 to binary
Divide 67 successively by 2 until the quotient is 0
   > 67/2 = 33, remainder is 1
   > 33/2 = 16, remainder is 1
   > 16/2 = 8, remainder is 0
   > 8/2 = 4, remainder is 0
   > 4/2 = 2, remainder is 0
   > 2/2 = 1, remainder is 0
   > 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 1000011
So, 67 of decimal is 1000011 in binary
> Now, Convert 0.43750000 to binary
   > Multiply 0.43750000 with 2. Since 0.87500000 is < 1. then add 0 to result
   > Multiply 0.87500000 with 2. Since 1.75000000 is >= 1. then add 1 to result
   > Multiply 0.75000000 with 2. Since 1.50000000 is >= 1. then add 1 to result
   > Multiply 0.50000000 with 2. Since 1.00000000 is >= 1. then add 1 to result
   > This is equal to 1, so, stop calculating
0.4375 of decimal is .0111 in binary
so, 67.4375 in binary is 01000011.0111

d)
-53
This is negative. so, follow these steps to convert this into a 2's complement binary
Step 1:
Divide 53 successively by 2 until the quotient is 0
   > 53/2 = 26, remainder is 1
   > 26/2 = 13, remainder is 0
   > 13/2 = 6, remainder is 1
   > 6/2 = 3, remainder is 0
   > 3/2 = 1, remainder is 1
   > 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 110101
So, 53 of decimal is 110101 in binary
So, 53 in normal binary is 00110101
Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0.
   00110101 is flipped to 11001010
Step 3:. Add 1 to above result
11001010 + 1 = 11001011
so, -53 in 2's complement binary is 11001011

Converting 11001011 to hexadecimal
1100 => C
1011 => B
So, in hexadecimal 11001011 is 0xCB

Answer: 0xCB




Related Solutions

Convert the following numbers as indicated. Use as few digits in the results as necessary or...
Convert the following numbers as indicated. Use as few digits in the results as necessary or as many as indicated in the problems (note: don't use table lookup). a) (011011101)2 to Base 10 b) (-69)10 to binary 2's complement representation using 9 bits c) (75.3125)10 to unsigned binary d) (-152)10 to hexadecimal 2’s complement representation
Convert the following decimal numbers to binary (You may use as many binary digits as necessary)...
Convert the following decimal numbers to binary (You may use as many binary digits as necessary) 25610 246710 102310 2310 710 Convert the following binary numbers to hexadecimal 1101 0010 1101 1111 1100 0101 0010 1001 1000 0000 0000 0001 0001 1000 0000 0000 Given  bits, how many unsigned binary numbers can be represented? Given  bits, how many signed binary numbers can be represented using the two’s compliment method? In the two’s complement method, why is there one more negative number than...
Convert each of following numbers to Binary numbers, showing all steps. a. (572) 8 b. (1604)...
Convert each of following numbers to Binary numbers, showing all steps. a. (572) 8 b. (1604) 8 c. (1066)10 d. (99)10 e. (80E)16 f. (135AB)16
Convert the following numbers to floating point and show work. -0.063 65.3
Convert the following numbers to floating point and show work. -0.063 65.3
Convert each of following numbers to Octal numbers, showing all steps. a. (111110110)2 b. (1100010)2 c....
Convert each of following numbers to Octal numbers, showing all steps. a. (111110110)2 b. (1100010)2 c. (2001)10 d. (1492)10 e. (A9)16 f. (5FF71 )16
2) Show 4 digits to the right of the radix point. a) Convert 94.8710 to binary....
2) Show 4 digits to the right of the radix point. a) Convert 94.8710 to binary. Show your work. b) Convert 101101.111 to decimal. Show your work.
6. Convert numbers as requested. SHOW YOUR WORK Convert 2B7 (base 16) to binary. Convert 0B2C...
6. Convert numbers as requested. SHOW YOUR WORK Convert 2B7 (base 16) to binary. Convert 0B2C (base 16) to binary. Convert -47 (base 10) to binary 8-bit signed-magnitude. Convert -52 (base 10) to binary 8-bit signed-magnitude. Convert -47 (base 10) to binary 8-bit one's complement. Convert -52 (base 10) to binary 8-bit one's complement. Convert -39 (base 10) to 8-bit binary using excess 127 notation. Convert -61 (base 10) to 8-bit binary using excess 127 notation.
Convert the following decimal number into (a) binary and (b) Octal (SHOW ALL STEPS) 205.75
Convert the following decimal number into (a) binary and (b) Octal (SHOW ALL STEPS) 205.75
Note: Show All the steps of your work. 1. Convert the following decimal real number to...
Note: Show All the steps of your work. 1. Convert the following decimal real number to a binary number with six places to the right of the binary point. 57.553 2. Represent the following decimal integer numbers in binary using 8-bit signed magnitude, one’s complement, and two’s complement representations: (a) 65 (b) -24 3. What is the value of the 8-bit binary number 10011110 in decimal assuming the following representation: (a) unsigned, (b) sign-magnitude, (c) one’s complement, (d) two’s complement....
Convert the following numbers to 32-bit, 2s compliment binary and hexadecimal formats. Show your work in...
Convert the following numbers to 32-bit, 2s compliment binary and hexadecimal formats. Show your work in recursive division form. 899726616 1656906428 -77102817 -251026154
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT