Perfor the following operation using 1's complement method (use 8 bit). 31+(-10) | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Perfor the following operation using 1's complement method (use 8 bit). 31+(-10)

please help me with this

26th Mar 2017, 6:46 AM
Aloka Devapriya
Aloka Devapriya - avatar
1 ответ
0
+31 (base 10) = 00011111 (base 2) +10 (base 10) = 00001010 (base 2) -10 (base 10) = 11110110 (base 2) (*) 31-10 (base 10) = 00011111 +11110110 = 00010101 (base 2)(**) = 21 (base 10) Note that (*) is the binary complement, and (**) is truncated to 8 bits.
19th May 2017, 5:25 AM
Álvaro