{J
-.!!.I n - 'L-,,-_.!!.-
{J rlJ
o
FIGURE1.5
Inpul-ouiput signals for gates
(8)Three-inputA;-';Ogate
~
C~ " A .,. n + C + f)
D
(h)Four-inputORgate FIGURE1.6
Gates with multipleInputs
if inputlogicrequirement s arc satisfied .The inputsignal~xandyin theAl"\DandORgatesmay existinoneoffo urpossiblestates:00.10. II.or OI. These inputsignalsareshowninFig.Ij to- gether withthecorrespo ndingoutputsignalfor eachgale.Thetiming diagramsillustratethe re- spo nseofeachga te tothefourinputsignalcombinations.Thehorizontalaxis of thelimingdiagram representstime.andthe verticalaxis sho wsthesignalasitchanges betweenthetwopossihlcvolt- agelevel s.'melowle velrepresentslogicO.the highle vellogic1.TheA!\1)gate respondswith alogicIoutputsignalwhen hothinputsignalsarelogicI.TheORgaterespondswitha logicI outputsigna lifanyinputsignalislogicI.TheNOTgateis commonly referred toas aninverter.
TIlereason for thisna meis apparentfromthesignal respon se in thetimingdiagram .whichsho ws thattheoutputsignalinvertsthe logicsense of the inputsignal.
ANDand ORgalesmayhavemore thantwo inputs.AnANDgale withthree inputsandan ORgate with fourinputsarcshowninFig .1.6.Thethree-inputA~Dgalerespon dswithlogic 1outputifallthreeinputs arclogic I.Theoutputproduceslogic0ifanyinputi:-,logicO.The four-InputORgateresponds withlog ic1ifany input islogicI:irs outputbecomes logic0 only when allinputsarclogicO.
P RO BLE M S
AnswersIn problcmvmarked...nh•appearatthe endufthebook.
1.1 Li" theoctalandhexadecimalnumbersfrom16to 32.UsingA.B.andCfo rthelust three Jig!ls.listthenumbersfromII1\ 128inbase13.
1.2- Whatistheexact numberotbyresina systemthatcontatnela)J2KhytcS.lh )(wMhyIC"and (e )6AGbytes?
32 Ch apter 1 Dig ita l Syste ms a nd Binary Numbers
1.3 Convert the followin g numbers with the indicated bases to decimal:
(a)* {43 10h (b)* ( 198)12
~) {lli)8 W) (5~lb
1.4 What is the largest binary number that can be expressed with
14bits? What are the equivalent
dec-imal and hexadecimal numbers?
1.S· Determine the base of the numbers in each case for the following operations to be correct:
(a)
1 4/2 "" 5, (b)
54/4 =13,
(c)
24 + 17 "" 40.
1.6* The solutions to the quadratic equation x
2 -II
x+ 22 "" 0
arex
=3 and x
=6. What
isthe
baseof the numbers?
1,7* Convert the hexadecimal
number68BE to binary, and then convert it from binary to
octal.1.8 Convert the decimal number 43 1 to binary in two ways: (a) Convert directly to binary; (b) con- vert first
10hexadecimal and then from hexadecimal t o binary. Which method is faster?
1.9 Express the following numbers in decimal :
(a)* { 1011O.OIOlh (b)* ( 16.51
Ib(c)* {26.24)g
(d)(FAFA)16
(e)
(lO IO .lOlOh
1. 10 Convert the following binary numbers to hexadecimal and
10decimal:
(a)1.100 10 , (b) 110.010.
Explain why the decimal answer in (b) is 4 times that in (a).
1, 1 1 Perform the following division in binary: 111011 + 1 01.
1,1 2*' Add and mult iply the following numbers without converting them to decimal.
(a)
Binary numbers 1011 and 101.
(h)
Hexadecimal numbers 2E and 34.
1,1 3
Dothe following conversion problems:
(a) Convert decimal 27.3 1 5
10binary.
(b) Calculate the binary equivalent of 213 out to eight places. Then convert from binary to dec- imal. How close is the result to 213?
(c) Convert the binary result in (b) into hexadeci mal. Then convert the result to dec imal. Is the answer the same?
1 ,14 Obtain the I' s and 2's complements of the following binary numbers:
(a) I()()()()OO() (b) OOOOOOOO
(c) 11011010 (d) 0 11 10110
(e)
10000 1 01
(f)1111 111 1.
1. 1 5 Find the c's and the
to'scomplement of the following decimal numbers:
(a) 52,784,630 (b) 63,325,600
(c)
25,000.000 (d) 00,000,000.
1.1 6
(a)Find the 1 6' s complement of B2FA.
(bl
ConvertB2FA to binary.
(c) Find the 2's complement of the result in (b).
(d) Convert the answer in (e )
10hexadecimal and compare with the answer in (a).
Problems 33
1.17 Perf ormsubuecuonon lht given unvigned numbersu\inll lilt 10's complementof the:subera- hend.Where the re\u1l~houlJbenegalive.lind it' IO·~complemenlandaffh a minu\lIign,Ver - ify)ouran..wers.
(a) 6.428- 3.409 Ib) 125- 1.Il.OO
(c) 2.0..0 - 6.152 (d) 1.631- 745
1.18 Performwbtraction on thegivenunsignedbinarynumbervu..ingltat 2's complementof the!tUb- lrahend.Wherethere..uh..hooldbeI1C'f alive. finditv2'.. ccmplemen rand affixaminussign.
(a) 10011- J(XJ()J Ib) I(O) JO- IMII
(e) 1001- 101000 fd) II(J(XJO- 10101
1.19'" Thefollowing decimalnumbers;'l~..hownindgn-magnitudeform:+9.286and+801.COO\'crt
them10<,ignai.1O'l>-eomplcmcnlform and performtbefollowingoperations(notethai thesc m is+JO.627 and requirelofivedigiband asigm.
(a) (+\.1.21\6)+ (+80 1) (b) (+9. 286)+ (-SOl)
(c) (-9.286)+(HOI) Cd) (-9 .2X6)+(-801)
1.20 Convertdecimal+46and+29 tobinary.usingthesigned-2' \-compleme nlrepresentationand enough digil' tu accommodate the numbers. The n pcrfonn the binary equivalent of (+29) +(-49).(-29) +(+49).and(-29)+(-49).Converttheanswe rsbackIndecimal and verifylhal the yarc correct.
1.21 If the numbe r..(+9.742 )10and (+64 1heare in sig ned magnitude formal.their sum is (+10.383 110and rtquire'fivedigits anda..ign,Convert the numbersII)signed.IO·~-eomple.
memformandfindlhefollowingsum..:
fa) (+9.74 2) +(+641) (b) (+9.14 2)+(-6.JI)
lc t (-9.14!)+ (+MI) tdl (- 9.142) +(-641)
1.22 COO\'et1decimal11.123to bo!:h BCD andASCIIcodes.ForASCII.anevenparitybitis10beap-
~ndedat lhe Iefl.
1.2 ! RepresenttbeunvignedOecnllal numbers8-l!and5.'7in RCD.andthensbo....rbesteps11C'Cer..- 'kil')'to fonntheirvum,
1.24 Formulate3...eigbtedI:linarycodefor lhe decimaldi~it" u,ing...eight..
(a)-b.3.I.I Ib, b.4.2.1
1.2.5 Represcnllhcdfi: imalnumhl:r 5.1.\7in(a )BCI>.(hje~(e~ ,-3(ode.fc)2421code.and(d) a 6.\l lwde.
1.26 Find th...9\ complementofdecim:115.137 andexpre~<,itin2421cooe.Sho....th3.1the resultis lhe 1"s.complementof the answer10tc ) in Problem1.25.Thisdernon-ararcsthatthe 2421code i,self-complememing.
1.27 As ~i~n3. binary codeinsomeorderlymanner tothe :'l2playingcards.Use theminimumnumber ofbits.
1.28 wnrethe expresvicn"G.Hoole"inASCII.usinganei~ lll-bil...sde.Includethe po.:riudandthe space.Trt3.1theleftmn,1bil of eachcharacteras a pantybil.Each eight-bitcodelohould have e..en parily.lGcorgcBootewasa19th (enlul) marhemaucian.Boolean algebra.introducedin theneXlchapeer.bean.hisname.)
Chapter 1 Digital S ystems a nd Binary Numbers
1.29'"
Decode the following AS
CIIcode
:1000010110100 1 1101100 1101100 100011111000011110100
110010111
1001 1.1.30 The
followingis astring of ASCIIcharacterswhose bit patterns have been converted into hella - decimal for com pactnes s: 7J F 4 E5 76 E5 .fA EF 62
73.Of the eight bus
ineach pairof digits.the
leftmos t is aparity bit. The remainin g bits
aretheASCII
code.(a) Convert
tlv: string to bit form and decooe the ASCII.
(b)
Determine
the parityused
:odd or
even?1.31 ·
How manyprinting characters are
therein ASCI
I?Howmany of them are
special charac1ers (noI:letters or numerals)?
1 -32"
What bitmustbe
complemented 1
0ch
angean ASC
IIleiter from capital to
lowercase and viceversa?
1.33· The sta
teof a
12·bit register is
1000 100 1011 1.
What is nscontenrif it repre
sents(a) three
decimal digitsin
BCD?(b) three dec
imal digitsin theexce ss-a code
?(c)
threedecimaldigibin the84-2·
1code
? (d) abinary number?1.34 List theASCIIcode furthe10 decimal digits
with an odd parity bit
in theleftmost position. 1.35 Bymeans of a timing diagram
sirnilar toFig.1.5.M10wthe signals of the oolpUlS
f andg in Fig.
PI.35as functions of the three
inputs a.b. and
c.Use
all eightpossible comb
inationsof a. b.:UIdc.
•
b
cH '- r
FIGURE
Pl.351.36 By
means o
f atiming diagram similar to Fig.
1.5.show the signals ofthe outputsf and
gin
Fig.PI.36 asfunctio ns of thetwo inputsa and b.