CEG 2136 Study Guide - Midterm Guide: Logic Gate, Sequential Logic, Negative Number

48 views6 pages
1
Question (1)
The range of signed integers N expressed in 2-s complement
representation that can be stored in a 10-bit register is:
(a) -1024ā‰¤Nā‰¤+1023 (b) -1023ā‰¤Nā‰¤+1024
(c) -512ā‰¤Nā‰¤+511 (d) -511ā‰¤Nā‰¤+512
(e) None of the above
SOLUTION
1-bit for the Sign and 9 bits represents the number, so
-2
9
ā‰¤ N ā‰¤ 2
9
-1
(c) -512ā‰¤Nā‰¤+511
2
Question (2)
Identify the decimal number which is represented next in floating
point with the IEEE 754 standard:
11000010100010101100000000000000
(a) (- 133.375)10 (b) (- 69.375)10
(c) (- 138.750)10 (d) (- 34.6875)10
(e) (- 8.671875)10
SOLUTION
1 10000101 00010101100000000000000
SE M
Unlock document

This preview shows pages 1-2 of the document.
Unlock all 6 pages and 3 million more documents.

Already have an account? Log in
3
Question (2) (Cont.)
SOLUTION
1 10000101 00010101100000000000000
SE M
ī€
Find ā€œrealā€ exponent,
n
n
= E ā€“ 127
= 10000101
2
ā€“ 127 = 133 ā€“ 127 = 6
ī€Put S, M, and n together to form binary result
(Donā€™t forget the implied ā€œ1.ā€ on the left of the mantissa.)
-1.000101011
2
x 2
6
= (-1000101.011)
2
2
-2
= 0.25
2
-3
= 0.125
0.375
-69
(b) (- 69.375)
10
4
Question (3)
Give the best binary approximation of A = (26.6)
10
and B = - (23.4)
10
employing signed 2ā€™s-complement representation
with 2 bits for the fractional part.
SOLUTION
A=
(26.6)
10
ā‰ˆ+(11010.10)
2
= (011010.10)
2
= (26.5)
10
B = - (23.4)
10
= -(010111.10)
2
= -
b
with
b
= +23.5 (closest to 23.4)
Letā€™s assume that we donā€™t know how to find the 2ā€™s-complement of a
fractional negative number, so weā€™ll consider
ā€¢
b
= (010111.10)
2
=(010111.10)
2
x 2
2
/2
2
= (01011110)
2
/2
2
ā€¢
First weā€™ll find the 2ā€™s-complement of (01011110)
2
= (10100010)
2
ā€¢
then weā€™ll divide it by 2
2
to scale back, such that
=>
2ā€™s-complement of (010111.10)
2
= (10100010)
2
/2
2
= (101000.10)
2
Unlock document

This preview shows pages 1-2 of the document.
Unlock all 6 pages and 3 million more documents.

Already have an account? Log in

Document Summary

The range of signed integers n expressed in 2(cid:24)s complement representation that can be stored in a 10(cid:24)bit register is: (a) (cid:24)1024 n +1023 (b) (cid:24)1023 n +1024 (c) (cid:24)512 n +511 (e) none of the above (d) (cid:24)511 n +512. Solution (cid:1)(cid:2)(cid:3)(cid:4)(cid:5)(cid:6)(cid:7)(cid:8)(cid:9)(cid:6)(cid:5)(cid:10)(cid:11)(cid:6)(cid:12)(cid:4)(cid:13)(cid:14)(cid:6)(cid:15)(cid:14)(cid:16)(cid:6)(cid:17)(cid:6)(cid:3)(cid:4)(cid:5)(cid:18)(cid:6)(cid:9)(cid:11)(cid:19)(cid:9)(cid:11)(cid:18)(cid:11)(cid:14)(cid:5)(cid:18)(cid:6)(cid:5)(cid:10)(cid:11)(cid:6)(cid:14)(cid:20)(cid:21)(cid:3)(cid:11)(cid:9)(cid:22)(cid:6)(cid:18)(cid:8)(cid:6) (cid:2)(cid:23)9 n (cid:23)9(cid:2)(cid:1) (c) (cid:24)512 n +511. Identify the decimal number which is represented next in floating point with the ieee 754 standard: 11000010100010101100000000000000 (a) ((cid:24) 133. 375)10 (c) ((cid:24) 138. 750)10 (e) ((cid:24) 8. 671875)10 (b) ((cid:24) 69. 375)10 (d) ((cid:24) 34. 6875)10. 10000101 (cid:3) (cid:1) (cid:24)(cid:4)(cid:14)(cid:16)(cid:6)(cid:25)(cid:9)(cid:11)(cid:15)(cid:26)(cid:27) (cid:11)(cid:28)(cid:19)(cid:8)(cid:14)(cid:11)(cid:14)(cid:5)(cid:22)(cid:6)(cid:14) (cid:14) (cid:29)(cid:6)(cid:30)(cid:6)(cid:31) (cid:1)(cid:23) (cid:29)(cid:6)(cid:1)!!!!(cid:1)! (cid:1)(cid:23) (cid:31) (cid:1)(cid:23) (cid:6)(cid:29)(cid:6)(cid:1)(cid:6)(cid:31) (cid:1)(cid:23) (cid:6)(cid:29)(cid:6)# (cid:1) (cid:5)(cid:6)(cid:12)(cid:22)(cid:6)%(cid:22)(cid:6)(cid:15)(cid:14)(cid:16)(cid:6)(cid:14)(cid:6)(cid:5)(cid:8)(cid:13)(cid:11)(cid:5)(cid:10)(cid:11)(cid:9)(cid:6)(cid:5)(cid:8)(cid:6)(cid:7)(cid:8)(cid:9)(cid:21)(cid:6)(cid:3)(cid:4)(cid:14)(cid:15)(cid:9)&(cid:6)(cid:9)(cid:11)(cid:18)(cid:20)(cid:26)(cid:5) "((cid:8)(cid:14))(cid:5)(cid:6)(cid:7)(cid:8)(cid:9)(cid:13)(cid:11)(cid:5)(cid:6)(cid:5)(cid:10)(cid:11)(cid:6)(cid:4)(cid:21)(cid:19)(cid:26)(cid:4)(cid:11)(cid:16)(cid:6)(cid:25)(cid:1)*(cid:27) (cid:8)(cid:14)(cid:6)(cid:5)(cid:10)(cid:11)(cid:6)(cid:26)(cid:11)(cid:7)(cid:5)(cid:6)(cid:8)(cid:7)(cid:6)(cid:5)(cid:10)(cid:11)(cid:6)(cid:21)(cid:15)(cid:14)(cid:5)(cid:4)(cid:18)(cid:18)(cid:15)*+ (cid:1)(cid:1)(cid:2)(cid:3)(cid:3)(cid:3)(cid:1)(cid:3)(cid:1)(cid:3)(cid:1)(cid:1)(cid:2)(cid:3) (cid:4)(cid:3)(cid:2)(cid:1) (cid:5)(cid:3)(cid:4)(cid:1)(cid:1)(cid:3)(cid:3)(cid:3)(cid:1)(cid:3)(cid:1)(cid:2)(cid:3)(cid:1)(cid:1)(cid:5)(cid:2) (cid:5)(cid:14)(cid:15) (cid:4)(cid:5)(cid:4) (cid:6)(cid:7)(cid:8)(cid:9)(cid:4)(cid:10) (cid:4)(cid:5)(cid:11) (cid:6)(cid:7)(cid:8)(cid:9)(cid:12)(cid:4)(cid:10) (cid:8)(cid:9)(cid:11)(cid:13)(cid:10) (b) ((cid:24) 69. 375)10. Give the best binary approximation of a = (26. 6)10 and b = (cid:24) (23. 4)10 employing signed 2"s(cid:24)complement representation with 2 bits for the fractional part. B = (cid:24) (23. 4)10 = (cid:24)(010111. 10)2= (cid:24)b with b = +23. 5 (closest to 23. 4)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Documents

Related Questions