What is 4366 3415 when these values represent signed 12bit

What is 4366 – 3415 when these values represent signed 12-bit octal numbers? The result should be written in octal. Show your work.

Solution

We will follow the step below:

1>Convert the two numbers into binary and then into equivalent decimal number
2>Subtract the number
3>Convert it back to signed octal


Algo 1:
Signed binary to decimal conversion

To convert a signed binary int to a decimal number, use the following algorithm. We illustrate the algorithm on two 3-bit examples: 110 and 010.

If the leftmost bit is a 1, the number is negative. Do the following... (110 starts with a 1. It\'s negative.)
   Flip all the bits in the number. (110 becomes 001.)
   Add 1 to the number. (001 + 1 = 010.)
   Convert the result to base 10 and report its negation. ( 0102 is 210. The answer is -2.)
If the leftmost bit is a 0, the number is positive or zero. Convert the number from base 2 to base 10 and report the result. (101 starts with a 0. 1012 is 510. The answer is 5.)

Algo 2:
Decimal to Signed binary conversion

Convert the absolute value of the number to base 2.
Put enough 0s on the left side to give the base 2 number as many bits as you have available (e.g., 3 bits in our examples). (1 needs three extra 0s: 001.)
If the original number was positive stop and report the result. (1 is positive; so, the answer is 001.)
Otherwise, flip the bits in the base 2 number and add 1 (ignoring any carry that goes beyond the number of bits available), and report the result. (-4 is negative; so, we flip the bits in 100 to get 011 and add 1. The answer is 100.)

(4366)8

Binary Equivalent= 100 011 110 110
left most bit is 1 so the number is a negative number (Following algo 1 above),So we will flip all the bits= 011100001001
Add 1 to the flipped number = 011100001001 + 1=011100001010
Decimal value = -1802

Binary Equivalent= 011 100 001 101
Left most bit is 0 so the number is Positive
Decimal value= 1805


(4366)8 - (3415)8= (-1802 - 1805)10= (-3607)10


So the difference of these two numbers in Decimal is -3607(Following algo 2 above to convert it back to Signed binary and then to octal)

(011110000111)2
Flip the bits and add 1 as the number was negative= (100001111000+1)2= (100 001 111 001)2

(4171)8 is the final solution

What is 4366 – 3415 when these values represent signed 12-bit octal numbers? The result should be written in octal. Show your work.SolutionWe will follow the st

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site