1. 1
Roth Ch.1 Nts
Chp: Numbersystems and conversion(Roth)
Objectives:
The difference between combinational and sequential circuits
Convert whole numbers (includingnegative) and fractions from binary to (dec, oct, hex) and vice-versa.Arithmetic operations for
whole numbers and fractions in differentbases
Add, subtract,multiply,and dividepositivebinary numbers. Explain theaddition and subtraction process in terms of carries and
borrows.
Given a positiveinteger, fraction,or mixed number in any base (2 through 16); convert to any other base. Representation of
fractions in binary,hex and octal.
Write negative binary numbers in sign and magnitude, 1’s complement, and 2’s complement forms. Add signed binary numbers
using1’s complement and 2’s complement arithmetic. Justify the methods used. State when an overflow occurs.
Represent a decimal number in binary-coded-decimal (BCD), 6-3-1-1,code, excess-3 code, etc.
Does or doesn’t the grouping in terms of 3 or 4 (for Octal and Hexadecimal),work after the dot for fractions in base8 and base16
systems. Does grouping (for octal and hex) and power series expansion work after the fraction pointtoo? Whether the grouping
should begin after the decimal or from the extreme RHS (Interpret followinglinefromRoth: Why should you start forming the
groups of four bits at the binary point instead of the left end of the number?).
(b) State two different ways of forming the 1’s complement of an n-bitbinary number.
(c) State three different ways of forming the 2’s complement of an n-bitbinary number.
(d) If the word length is n = 4 bits (includingsign),what decimal number does 10002 represent in sign and magnitude?
In 2’s complement?
In 1’s complement?
(f) If the word length is 6 bits (includingsign),whatdecimal number does
1000002 represent in sign and magnitude?
In 2’s complement?
In 1’s complement?
(g) What is meant by an overflow? How can you tell that an overflow has occurred when performing 1’s or 2’s complement
addition? Does a carry out of the lastbitposition indicatethatan overflow has occurred?
What is the justification for usingthe end-around carry in 1’s complement addition?
(j) The one thing that causes the most trouble with 2’s complement numbers is the special caseof the negative number which
consists of a 1 followed by all 0’s (1000 .. . 000). If this number is n bits long, what number does itrepresent
and why? (It is not negative zero.)
(d) How are the ASCII codes for the decimal digits obtained? Whatis the relation between the ASCII codes for the capital letters and
lowercaseletters?
2. 2
Roth Ch.1 Nts
Digital Systems and Switching Circuits
The design of digital systems may be divided roughly into three parts—systemdesign, logic design,and circuitdesign.System design involves
breakingthe overall systeminto subsystems and specifyingthe characteristicsof each subsystem. For example, the system des ign of a digital
computer could involvespecifyingthe number and type of memory units,arithmetic units, and input-output devices as well as the
interconnection and control of these subsystems.Logic design involves determininghow to interconnect basic logicbuildingblocksto
perform a specific function.An example of logic design is determiningthe interconnection of logic gates and flip-flops required to perform
binary addition.Circuitdesign involves specifyingtheinterconnection of specific components such as resistors,diodes,and transistorsto
form a gate, flip-flop,or other logic buildingblock.Mostcontemporary circuitdesign is donein integrated circuitformusingappropriate
computer-aided design tools to lay out and interconnect the components on a chip of silicon.This book is largely devoted to a study o f logic
design and the theory necessary for understandingthe logic design process.
Many of a digital system’s subsystems take the form of a switchingcircuit(Figure1-1). A switchingcircuithas oneor more inputs and one or
more outputs which take on discretevalues.In this text, we will study two types of switchingcircuits—combinational and sequential.In a
combinational circuit,the output values depend only on the present valueof the inputs and not on pastvalues.In a sequenti al circuit,the
outputs depend on both the present and pastinput values.In other words, in order to determine the output of a sequential circuit,a
sequence of input values mustbe specified.The sequential circuitis said to havememory because itmust “remember” something about the
pastsequence of inputs,whilea combinational circuithas no memory. In general, a sequential circuitis composed of a combi national circuit
with added memory elements. Combinational circuits areeasier to design than sequential circuits and will bestudied first.
The basic buildingblocksused to construct combinational circuitsarelogic gates.The logic designer must determine how to interconnect
these gates in order to convert the circuitinputsignals into thedesired output signals. Therelationship between these inputand output
signalscan bedescribed mathematically usingBoolean algebra.In order to design an economical circuitto realizethese output functions,the
logic equations which describethe circuitoutputs generally must be simplified.Algebraic methods for this simplification aredescribed in Unit
3, and other simplification methods (Karnaugh map and Quine-McCluskey procedure) aredescribed later.
The basic memory elements used in the design of sequential circuitsare called flip-flops(Unit11).These flip-flopscan beinterconnected
with gates to form counters and registers (Unit 12). Analysis of more general sequential circuits usingtimingdiagrams,statetables,and
graphs is presented in Unit 13. The firststep in designinga sequential switchingcircuitis to constructa state table or graph which describes
the relationship between the inputand output sequences (Unit 14). Methods for goingfrom a state table or graph to a circuit of gates and
flip-flops aredeveloped in Unit 15.
In Unit 18, combinational and sequential design techniques areapplied to the realization of systems for performing binary ad dition,
multiplication,and division.The sequential circuits designed in this text are called synchronous sequential circuits becausethey use a
common timing signal,called a clock,to synchronizethe operation of the memory elements.
The switchingdevices used in digital systems aregenerally two-state devices, that is,the output can assumeonly two different discrete
values.Examples of switchingdevices arerelays,diodes,and transistors.Arelay can assumetwo states —closed or open—depending on
whether power is applied to the coil or not. A diode can be in a conductingstate or a nonconductingstate. A transistor can bein a cut-off or
saturated state with a correspondinghigh or low output voltage. Of course, transistorscan also beoperated as linear amplifierswith a
continuous rangeof output voltages,but in digital applicationsgreater reliability is obta ined by operatingthem as two-state devices.
Because the outputs of most switchingdevices assumeonly two different values,itis natural to use binary numbers internall y in digital
systems.
--------------------------------------------
Number System and Conversion:
Conversion from any baseto decimal: Justdo the power series expansion (in base10 arithmetic)
Conversion from decimal to any base: Convert the power series expansion of the number as follows (though this approach is a
headache, given you have to do the math in that base. Note that you convert the tens to the target base):
14710=1 x (1010)2 + (100) x (1010)1 + (111) x (1010)0 (This is base2,below is base3, 101 being 10 in base3)
14710=1 x (101)2 + (11) x (101)1 + (21) x (101)0
Conversion of a decimal fraction to baseR can be done usingsuccessivemultiplications by R.This process is continued until we have
obtained a sufficientnumber of digits.Note that the integer partobtained at each step is one of the desired digits and the most
significantdigitisobtained first.
3. 3
Roth Ch.1 Nts
Conversion between two bases other than decimal can be done directly by usingthe procedures given; however, the arithmetic
operations would have to be carried out usinga baseother than 10. It is generally easier to convert to decimal firstand then
convert the decimal number to the new base.
Binary Arithmetic
4. 4
Roth Ch.1 Nts
Note: In above, “borrow propagates”means that if you need to subtractfrom the firstcolumn (from right),and the borrow has to
be from the 6th column (with everything in between being zeroes), then the 5th to 2nd column tops will have1s as well due to
propagation.Try subtracting1 from 10000 to see what is meant.
Note: In binary multiplication, notethat each partial productis either the multiplicand (1101) shifted over the appropriatenumber
of places or is zero.
RepresentationofNegative Numbers:
An N-bit ones' complement numeral system can only represent integers in the range −(2N−1
−1) to 2N−1
−1 w hile tw o's complement can express
−2N−1
to 2N−1
−1.
6. 6
Roth Ch.1 Nts
A general rule for detecting overflow when addingtwo n-bit signed binary numbers (1’s or 2’s complement) to get an n-bitsum is:
An overflow occurs if addingtwo positivenumbers gives a negative answer or if addingtwo negative numbers gives a positive
answer.
Binary Codes: