Академический Документы
Профессиональный Документы
Культура Документы
Language
CS – 204
Instructor
Ms. Saman Iftikhar
Submitted By
Muzaffar Salik
Roll Number: 1388
BS – CS (4th Semester)
3/23/2011 8:41:01 PM BY
M.IRFAN ARSHAD
BS (cs) Assignment # 1
cs-204
(6ACDFA95)16= (01101010110011011111101010010101)2
Q.5. What is the 16-bit hexadecimal representation of each signed decimal integer? 6 Marks
a. -452
16 452
16 28 4
` 1 C
(452)10= (1C4)16
2’s Complement of 1C4 is E3C
So (-452)10= (E3C)16
b. -62
16 62
3 E
(62)10= (3E)16
2’s Complement of 3E is C2
So (-62)10= (C2)16
Q.6. What is the 8-bit binary (2’s complement) representation of each of the following signed decimal integers. 6
Marks
a. -36
2 36
2 18 0
2 9 0
2 4 1
2 2 0
2 1 0
(36)10= (00100100)2
2’s Complement
00100100
11011011
+ 1
(-36)10= (11011100)2
b. -98
2 98
2 49 0
2 24 1
2 12 0
2 6 0
2 3 0
1 1
3/23/2011 8:41:01 PM BY
M.IRFAN ARSHAD
BS (cs) Assignment # 1
cs-204
(98)10= (01100010)2
2’s Complement
01100010
10011101
+ 1
(-98)10= (10011110)2
Q.5. What is the largest unsigned integer that may be stored in 20 bits? 5 Marks
20-bit
integer Unsigned: 20 log102 From 0 to 1048575
0 to (2n − 1)
Q.6. If a Boolean function has 4 inputs, how many rows would be required for its truth table? 2 Marks
Input Rows
4 16
3/23/2011 8:41:01 PM BY
M.IRFAN ARSHAD