Professional Documents
Culture Documents
Introduction to Computing
1st June, 2020
(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.
Convert the calculated answer back into Decimal Number System.
First Step
convert Decimal into Binary Numbers
320
2 160_0
2 80_0
2 40_0
2 20_0
2 10_0
2 5_0
2 2_1
1_0
(320)10 = (101000000) 2
122
2 61_0
2 30_1
2 15_0
2 7_1
2 3_1
1_1
(122)10 = 1111010 2
Second Step
Perform the Arithmetic operation on Binary Numbers
(320)10 (122)10
(101000000)2 1111010 2
101000000
(101000000)2 1111010 2
1111010
(11000110) 2
011000110
Third Step
Convert the calculated answer back into Decimal Number System.
(11000110) 2
(1 2) 7 (1 2)6 (0 2)5 (0 2) 4 (0 2) 3 (1 2) 2 (1 2)1 (0 2) 0
128 64 0 0 0 4 2 0
198
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