You are on page 1of 6

CSC 159: Computer Organization|

REVISION QUESTION

1. Build a truth table for the following equation:

A B C ~A (A + B) (~A + C) (A + B) . (~A + C)
0 0 0 1 0 1 0
0 0 1 1 0 1 0
0 1 0 1 1 1 1
0 1 1 1 1 1 1
1 0 0 0 1 0 0
1 0 1 0 1 1 1
1 1 0 0 0 0 0
1 1 1 0 0 1 0

(6 marks)

2. Build a logic circuit for the following equation:

1 All the best!


CSC 159: Computer Organization|
REVISION QUESTION

(4 marks)

3. Show the behavior of the following circuit with a truth table:

B Y

C
Answer:

A B C B AB AB C

0 0 0 1 0 0

0 0 1 1 0 1

0 1 0 0 0 0

0 1 1 0 0 1

1 0 0 1 1 1

1 0 1 1 1 0

1 1 0 0 0 0

1 1 1 0 0 1
(6 marks)

4. Draw a circuit diagram corresponding to the following Boolean expression:

Y= (AB + C) D

Answer:

2 All the best!


CSC 159: Computer Organization|
REVISION QUESTION

(4 marks)

a) Convert the following numbers to the respective numbering systems. Show your work.

i) ABCDE16= 101010111100110111102=70371010

ii) 10010001101002 = 1234 16 =110648

b) Perform each of the following operations using 2’s complement.

i) 1110-2510 (8 bits)

Answer:

00011001

11100110 1st complement

+ 1 2nd complement

11100111

+ 00001011

11110010

ii) 591C16-7BBC16 (16 bits)

Answer:

01111011 10111100

10000100 01000011 1st complement

+ 1 2nd complement

10000100 01000100

+ 01011001 00011100

11011101 01100000

3 All the best!


CSC 159: Computer Organization|
REVISION QUESTION

c) Convert the following number to IEEE single-precision format. Give the results in
hexadecimal. The number is -27/256.

Answer:

= [-] 27 x 2-8 (0.5 m)


Number

Sign -ve=1 (0.5 m)

Number = 11011 x 2-8

= 1.1011 x 2-4 (0.5 m)

Biased = -4 +127=123

Exponent = 011110112 (1 m)

Mantissa = 1.1011 (0.5 m)

Sign Biased Exponent Significand

1 01111011 101 1000 0000 0000 0000 0000

(1 m)

Hexadecimal BDD8000016 (1 m)

4 All the best!


CSC 159: Computer Organization|
REVISION QUESTION

d) Convert 2C2E000016 IEEE single precision floating point number to decimal.

Answer:

Convert to binary=0010 1100 0010 1110 0000 0000 0000 0000 (0.5 m)

IEEE Format (0.5 m)

Sign Biased Exponent Mantissa

0 010 1100 0 010 1110 0000 0000 0000 0000

Sign = 0 =+ve (0.5 m)

Biased exponent = 01011000 = 88 (0.5 m)

Exponent= 88 – 127 =-39 (0.5 m)

Significand =01011100000000000000000 (0.5 m)

Mantissa =1.010111(0.5 m)

The number=1.010111 x2-39

=1010111 x 2-6 x 2-39 (1 m)

=87 x2-45 (0.5 m)

5 All the best!


CSC 159: Computer Organization|
REVISION QUESTION

e) Given the contents of registers as below:

AX = 25BDh
BX = 5267h
CX = A564h
DX = 2478h
SP = FFE0h

a. Build a stack after the following instructions are executed. State the contents of registers
AX, BX, CX, DX and SP after the instructions are executed.
PUSH AX
PUSH BX
POP BX
PUSH AX
POP BX

Answer

FFDB
FFDC
FFDD 67 BD
FFDE 52 25
FFDF BD
FFE0 25

AX BX CX DX SP
25BD 5267 A564 2478
5267
25BD FFDE @
FFDF

6 All the best!

You might also like