You are on page 1of 2

COMPUTER SCIENCE NOTES

1. Construct truth tables for the following expressions:


i. NOT (p OR q) AND (NOT r and NOT p)
ii. (p NAND q) NOR r
iii. R XOR (p NAND q)

1 i.

p q r C = NOT(P OR Q) D = NOT r and NOT p OUTPUT

0 0 0 1 1 1

0 1 0 0 1 0

1 0 0 0 0 0

1 1 0 0 0 0

0 0 1 1 0 0

0 1 1 0 0 0

1 0 1 0 0 0

1 1 1 0 0 0

1 ii.

p q r D = p NAND q X = D NOR r

0 0 0 1 0

0 0 1 1 0

0 1 0 1 0

0 1 1 1 0

1 0 0 1 0

1 0 1 1 0

1 1 0 0 1

1 1 1 0 0
1 iii.

p q r D = p NAND q X = D XOR r

0 0 0 1 1

0 0 1 1 0

0 1 0 1 1

0 1 1 1 0

1 0 0 1 1

1 0 1 1 0

1 1 0 0 0

1 1 1 0 1

2. Find the values of :


i. 12.3125
ii. 4.25

A. i. 1100.0101
ii. 100.01

3. Find the 2’s complement representation of:


i. - 23
ii. -90

A. i. 11101001
ii. 10100110

You might also like