Introduction To Computing (CS101) : Assignment # 01
Introduction To Computing (CS101) : Assignment # 01
Introduction to Computing MC
(CS101)
Assignment # 01
You are required to perform the following stated operations in Binary Number System
(320)10 + (-122)10
o Please first convert the stated Decimal Numbers into Binary Numbers.
o Perform the Arithmetic operation on Binary Numbers.
o Convert the calculated answer back into Decimal Number System.
Answer:
So (320)10 = (101000000)2
So (-122)10 = (1111010)2
Second Step: Now, applying arithmetic operation on binary converted numbers, we get
(320)10 + (-122)10 = (101000000)2 + (1111010)2
Following these addition
rules
101000000
0+0=0
001111010
0+1=1
1+0=1
110111010
1 + 1 = 0, carry over the 1
Third Step:
Binary Number 1 1 0 1 1 1 0 1 0
Power of 2 28 27 26 25 24 23 22 21 20
(110111010)2 = 1. 28 + 1. 27 + 0. 26 + 1. 25 + 1. 24 + 1. 23 + 0. 22 + 1. 21 + 0. 20
(110111010)2 = 256 + 128 + 0 + 32 + 16 + 8 + 2
(110111010)2 = 442
Answer:
A B C D ( A ⨁ B) ( A ⨁ B) ( ( A ⨁ B)∧ D) ( ( A ⨁ B)∧ D) ∨C ¿
0 0 0 0 0 1 0 0
0 0 0 1 0 1 1 1
0 0 1 0 0 1 0 1
0 0 1 1 0 1 1 1
0 1 0 0 1 0 0 0
0 1 0 1 1 0 0 0
0 1 1 0 1 0 0 1
0 1 1 1 1 0 0 1
1 0 0 0 1 0 0 0