This preview shows pages 1–3. Sign up to view the full content.
ECE 206001
Name:____________________________________________
NC State University
Exam 1(A): 21 September 2000
2
1. (27 points)
Give the decimal value represented by each of the following 8bit binary numbers, using each of the
following representations: unsigned, signmagnitude, two’s complement.
You must show your work
to get full credit.
unsigned
signmagnitude
two’s complement
01101001
105
105
105
11100111
231
103
25
10000010
130
2
126
(1) unsigned: 2
6
+2
5
+2
3
+2
0
=
64 + 96 + 8 + 1 = 105;
signmagnitude and two’s complement are the same,
because this is a positive number
(2) unsigned: 2
7
+2
6
+2
5
+2
2
+2
1
+2
0
= 128+64+32+4+2+1 = 231;
signmagnitude: sign = 1 (negative), magnitude = 2
6
+2
5
+2
2
+2
1
+2
0
= 103;
two’s complement:
take complement to find –X = 00011001 = 25, so X = 25
(alternative: 2
7
+(2
6
+2
5
+2
2
+2
1
+2
0
) = 128 + 103 = 25)
(3)
unsigned: 2
7
+2
2
= 130;
signmagnitude: sign = 1 (negative), magnitude = 2
1
= 2;
two’s complement:
take complement to find –X = 01111110 = 126, so X = 126
(alternative: 2
7
+2
1
= 128 + 2 = 126)
n2
n
01
12
24
38
4
16
5
32
6
64
7
128
8
256
9
512
10
1024
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document ECE 206001
Name:____________________________________________
NC State University
Exam 1(A): 21 September 2000
3
2. (16 points)
Perform the following operations in binary using
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 04/18/2010 for the course ECE 109 taught by Professor Bradley during the Spring '08 term at N.C. State.
 Spring '08
 Bradley

Click to edit the document details