Transcript Lecture 7

D75P 34R - HNC Computer
Architecture
Week 7
A Mini Test!
© C Nyssen/Aberdeen College 2004
All images © C Nyssen /Aberdeen College unless otherwise stated
Timer, decision © Microsoft
ISO table © and courtesy of IBM
Prepared 9/11/04
This lecture will consist of 10 questions on a timer. The
questions are of equivalent difficulty to the Outcome 1
paper.
You have 1½ minutes to answer each one. After 1 minute a
dinosaur will appear, to let you know that you only have 30
seconds left before the slide changes!
At the end we will check the answers, and anything that you
did not understand will be expanded on the whiteboard.
You need six or more questions correct for a pass.
Ready to go?...........
Question 1. Take the following pair of binary numbers
1100 1010 0101 0000
1011 0111 1100 1100
And apply this gate
a. 1000 0010 0100 0000
b. 1111 1111 1101 1100
c. 0000 0000 0010 0011
d. 0111 1101 1011 1111
to get the answer…
Question 2.
What is the binary storage of the number -329 formatted
to 10 bits and using 2’s complement?
a.
b.
c.
d.
11 0100 1001
10 1011 0110
10 1011 0111
01 0100 1001
Question 3.
What is the hexadecimal number C2Ah in denary?
a. 3094
b. 3114
c. 40902
d. 1100 0010 1010
Question 4.
What is the binary value 1100 0111 0110 0010 in
hexadecimal?
a.B762h
b.C762h
c.D762h
d.D772h
Question 5.
The signed binary number 1101 1001 1001 in denary is –
a. -615
b. +615
c. -1433
d. +3481
Question 6.
Subtract the second number from the first one using
2’s complement and addition.
1101 1100 0110
0100 0111 0111
a.0010 0011 1101
b.1001 0100 1110
c.1001 0100 1111
d.0110 1011 0000
Question 7.
Add the hexadecimal values E550h and F19Dh.
a. 176EDh
b. 1B6FDh
c. 1C6EDh
d. 1D6CDh
Question 8.
Apply an XOR gate to the following pair of numbers.
1101 1100 0101 0011
0101 0101 0101 0101
a. 1101 1101 0101 0111
b. 0101 0100 0101 0001
c. 0010 0010 1010 1000
d. 1000 1001 0000 0110
Question 9.
What is the number 4771 in hexadecimal?
a. 12A3h
b. 1CA3h
c. 2933h
d. 2CA3h
Question 10.
The Greek character Ω
(omega) could be
represented by using
ISO 8859-7 and the
binary value
a.U+D9
b.U+BC
c.1101 1001
d.1011 1100
So let’s see how you got on……
Question 1. Take the following pair of binary numbers
1100 1010 0101 0000
1011 0111 1100 1100
And apply this gate
a. 1000 0010 0100 0000
b. 1111 1111 1101 1100
c. 0000 0000 0010 0011
d. 0111 1101 1011 1111
to get the answer…
The correct answer was d.
It is a NAND gate!
Question 2.
What is the binary storage of the number -329 formatted
to 10 bits and using 2’s complement?
a.
b.
c.
d.
11 0100 1001
10 1011 0110
10 1011 0111
01 0100 1001
+329 would be
reverse it…
add 1 to the LSB
01 0100 1001
10 1011 0110
10 1011 0111
so the answer was c.
Question 3.
What is the hexadecimal number C2Ah in denary?
a. 3094
b. 3114
c. 40902
d. 1100 0010 1010
C or 12 times 256 is
2 times 16 is
A or 10 times 1 is
3072
32
10
Add all together to get
3114
So the answer was b.
Question 4.
What is the binary value 1100 0111 0110 0010 in
hexadecimal?
a.B762h
b.C762h
c.CF62h
d.D772h
1100 is 12 or C
0111 is 7
0110 is 6
0010 is 2
The correct answer is C762h - b.
Question 5.
The signed binary number 1101 1001 1001 in denary is –
a. -615
b. +615
c. -1433
d. +3481
As it is a signed number, the leading 1
tells us that it must be negative!
Reverse all the remaining digits to get
010 0110 0110.
Add 1 to the LSB to get 010 0110 0111.
Convert back - (1 + 2 + 4 + 32 + 64 + 512) = 615.
So the answer was a.
Question 6.
Subtract the second number from the first one using 2’s
complement and addition.
1101 1100 0110
0100 0111 0111
a.0010 0011 1101
b.1001 0100 1110
c.1001 0100 1111
d.0110 1011 0000
Reverse the second number and
add 1 to the LSB1011 1000 1001
Add the two numbers…..
1101 1100 0110
1011 1000 1001
1001 0100 1111
The answer was c.
Question 7.
Add the hexadecimal values E550h and F19Dh.
a. 176EDh
b. 1B6FDh
c. 1C6EDh
d. 1D6EDh
E
5
5
0
F
1
9
D
29
6
14 or E
The 29 becomes
13, or D, carry 1….
The answer was 1 D 6 E D h - option d.
D
Question 8.
Apply an XOR gate to the following pair of numbers.
1101 1100 0101 0011
0101 0101 0101 0101
a. 1101 1101 0101 0111
b. 0101 0100 0101 0001
c. 0010 0010 1010 1000
d. 1000 1001 0000 0110
The correct answer was d.
Remember that the XOR
gate is the one that looks
for differences in the
inputs!
Question 9.
What is the number 4771 in hexadecimal?
a. 12A3h
b. 1CA3h
c. 2933h
d. 2CA3h
To do this without a calculator, you can set
up some Hexadecimal columns…..
4096’s
256’s
16’s
1’s
We will get one lot of 4096 out of the 4771, leaving 675.
(675-256) = 419. (419-256) = 163. So that’s 2 lots of 256.
We will get 10 lots of 16 out of 163, leaving 3 over….
So the answer is 1 2 A 3 h. Answer a.
Question 10.
The Greek character Ω
(omega) could be
represented by using
ISO 8859-7 and the
binary value
a.U+D9
b.U+BC
c.1101 1001
d.1011 1100
The answer was D9 in
hex - or 1101 1001.
Answer c.
So how was your score? If you got…….
8 - 10 …. Well done! You are a genius!
6 or 7 …. Congratulations! You should have no
trouble at all with the real assessment!
4 or 5 …. Unfortunate! You need to do a
wee bit more work between now and next
week...
3 or less …. REVISE ALL OF THE
LECTURES BEFORE NEXT WEEK!