You are on page 1of 2

. .

b ·ng the 2's complement 01


1.18 Perform subtraction on the given unsigned bmary num ers ust t and affix a
I
the subtrahend. Where the result should be negative, find its 2's comp emen
minus sign.
(a) 10010 - 11001 (b) 1001-101000
(c) 10011 - LO00l (d) 11011010- lOOlOJ 1
. . . . . d ·t d fO rm· +9 286 and +801.
1.19 '· l11e followmg decimal numbers are shown m s1gne -magm u e · , .
Convert them to signed-l0's-complernent form and perform the following operations
(note that the sum is + 10,627 and requires five digits and a sign).
(a) ( +9,286) + ( +801) (b) ( +9,286) + (-801)
(c) (- 9,286) + (+801) (d) (-9,286) + ( -801)
1.20 Convert decimal +49 and +29 to binary. using the signed-2's-complement repre_sentation
and enough digits to accommodate the numbers. Then perform the binary equivalent ~f
( +29) + (-49), (-29) + ( +49) , and (-29) + (-49). Convert the answers back to deci-
mal and verify that they are correct.
1.21 If the numbers ( +9,742) 10 and ( +641) 10 are in signed-magnitude format, their sum
is ( +10,383) 10 and requires five digits and a sign. Convert the numbers to signed-lO's-
complement form and find the following sums:
(a) ( +9,742) + ( +641) (b) ( +9,742) + (-641)
(c) (-9.742) + ( +641) ( d) (-9,742) + (-641)
1.22 Convert decimal 9,045 and 337 to both BCD and ASCII codes. For ASCII, an even parity
bit is to be appended at the left.
1.23 Represent the unsigned decimal numbers 8124 and 8127 in BCD, and then show the steps
necessary to form their sum.
1.24 For_~ ulate a weighted binary code for the decimal digits by using the following weights:
(a) ··· 6, 3, 1, 1 (b) 6, 4, 2, 1
1.25 Represent the decimal number 2231 in (a) BCD, (b) excess-3 code (c) 2421 d d
( d) 6311 code. ' co e , an
1.26 Find _the 9's coi:i-ipleme,nt of the decimal number 2,231 and express it in 2421 code. Show
th~t the result 1s the l s c~mplement of the answer to ( c) in Problem l.2S. · · _
strates that the 2421 code is self-complementing. This demon
1.27 Assign a binary code in some orderly manner to the 52 l · . .
number of bits. P aymg cards. Use the minimum
1.28 ll1 e message " Pass 0.12" is to be sent via communication . .
th e message should be encoded into a seven-bit ASCII Im~. For ~his, each character of
~pace: Each AS CII encoded character should b ti co~e mclud1ng the period and the
,t. Wnte th e expression for th e message sent. e ien enc1ypted by adding binary 10] to
1.29 Decode th e following AS C II code·
1001101 1101001 ] J 00011 1] ] 6010 11011] 1 .
1.30 Th e fo ll owing is a strin g of ASC II h 1110011110111T 11001101110100.
h d . c aracters who b.
d~~:s e~1~n~ I- for co~pac tn ess: 47 2E SC 42 CF c:~ct.t patterns ha:e been converted intc
g , t e leftmost is a parity bit Th . . C5. Of the eight bits in .
( a) Co nve rt th e strin g to bit fon~ , e re ma111111g bits are the ASCII cotle each pair o 1
(b) Dete rmin e th e pa ·t - and decode th e ASCII .
n y used : odd or eve n ? .
p
. ;tal systel11s and Bifl"' ; . ,ASCII? J-IoW many v, UH., UJ

Chap ter I 0•9 •acters a1·e there in


56 1.31 . ting
HoW ,nanYpnn numerals)?.
. orcha' e an ,ASCII Jetter trom capital
;ic1crs (not Je11ers ented to chan8
1.32 . Whal 1111. ,_ nusl be cornplert1 10001 00. What is its content if
vice ve rsa I . . 010101100
. . ·eg1s1:er ,s
1
1· 33 . n,estate of a• 16-Ibrt, . BCD?
digits 111 · 3 ode
(a ) f our decuna . excess· c ·
b) f r decimal digits in I1ie GraY code?
c ou · I . decim al digits ,n the r1·ty bit as t11e left-most b1t. m
. eact
(
c r our ,exa •ti1 even pa.
( ) n vo ASClf characters w,
(d) 1digits with an even parity bit
. the l Odecuna
f 1
1.34 (a) List the ASCII code 0
position. .
(b) Repeat (a) with odd parity.

REFERENCES
CAVANAG H, J. New York: McGraw-Hi!
J. 1984. Digital Computer Arithmetic.
1. MANO, M. M. 1988. Computer Engineering: Hardware Design. Englewood C
2.
tice-Hall.
NELSON, V. P, H. T. NAGLE, J. D. IRWIN, and B. D. CARROLL. 1997. Digital
3.
Analysis and Design. Upper Saddle River, NJ: Prentice Hall.
4. S CHMID , H · 1974 • D eama . New York: John Wdey.
. I Computatwn. .
5. R NJ· and .BORRIELLO, G. 2004. Contemporary Logic
K .ATZ, R.H. . Design 2nd ed 1
,ver, . Prent1ce-HaJJ. ' ., ,

NEB SEARCH TOPICS

Ts complement
ASCII
BCD addition
BCD code
Binary addition
Binary codes
Binary Jogic
Binary numbers
Computer arithmet·
E IC
rror correction
Excess-3 code
Gray code
Logic gate
Parity hit
Radix comp/ cmcnt
,S, haft encode r
S
- lorage reg1.stcr

You might also like