Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
1
IntroductionIntroduction toto DigDigital ital SystemsSystems
byDr. Ahmet ÖZKURT
for IZMIR University of ECONOMICS2006
Based on the notes ofJaeyoung Choi, [email protected] fall 2000
2/43
Digital Computers and Digital Computers and NumberNumber SystemsSystems
2
3/43Digital ComputersDigital Computers
Digital Computers‘information age’
a prominent and growing role in modern society'generality'
follow a sequence of instruction, called a program,that operates on given dataperform a variety of information-processing tasks
Digital computer the best-known example of a digital systemmanipulate discrete elements of information
(ex) 10 decimal digits, 26 letters of the alphabets, ....
4/43Digital ComputersDigital Computers
Signalselectrical signals such as voltages and currentstwo discrete values
High (output) 4.5~5.5 (input) 3.0~5.5Low (output) -0.5~1.0 (input) -0.5~2.0
High & Low (H & L), True & False, 1 & 0
Binary Number Systema binary digit is called a bitinformation is represented in group of bitsuse various coding techniques
3
5/43Digital ComputersDigital Computers
Computer Structure
Figure 1-2: Block Diagram of a Digital Computer
6/43Digital ComputersDigital Computers
Basic Structurememory unit: stores programs, input, output, dataALU Unit (Arithmetic Logic Unit): performs arithmetic and other dataprocessing operations, as specified by the programcontrol unit: supervises the flow of information between units(CPU = control unit + data path)input device: key boardoutput device: CRT, LCD
MoreFPU (floating-point unit)MMU (memory management unit)(Memory: MMU + internal cache + external cache + RAM)(See Text p.2)
4
7/43Number SystemsNumber Systems
decimal number (base 10 or radix 10)724.5 = 7 x 102 + 2 x 101 + 4 x 100 + 5 x 10-1
In general, AnAn-1....A1A0.A-1A-2....A-m+1A-m
Each Ai coefficient is (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
base r or radix rexpressed with a power series in rAn rn + An-1 rn-1 + .... + A1 r1 + A0 r0 + A-1 r-1 + A-2 r-2 + .… + A-m+1 r-m+1 + A-m r-m
expresses in positional notationAnAn-1....A1A0.A-1A-2....A-m+1A-m
. is called radix point
8/43Number SystemsNumber Systems
An is the most significant digit (msd)A-m is the least significant digit (lsd)enclose coefficients in parentheses and place a subscript
(312.4)5 = 3 x 52 + 1 x 51 + 2 x 50 + 4 x 5-1
= 75 + 5 + 2 + 0.8 = (82.8)10
in computer work, binary, octal, and hexadecimal is popular
Binary Numbersbase 2 with two digits: 0 & 1(11010)2 = 1x24 + 1x23 + 0x22 + 1x21 + 1x20 = (26)10
digits in a binary numbers are called bitspowers of two are listed in Table 1-1.
5
9/43Number SystemsNumber Systems
conversion of decimal to binarysuccessively subtracts powers of two from the decimal number
(625)10 = ( ? )2
625 - 512 = 113 512 = 29
113 - 64 = 49 64 = 26
49 - 32 = 17 32 = 25
17 - 16 = 1 16 = 24
1 - 1 = 0 1 = 20
(625)10 = 29 + 26 + 25 + 24 + 20 = (1001110001) 2
10/43Number SystemsNumber Systems
Octal and Hexadecimal Numberoctal number - base 8 (0, 1, ..., 6, 7)(127.4)8 = 1x82 + 2x81 + 7x80 + 4x8-1 = (87.5 )10
hexadecimal number - base 16 (0,1,....,9,A,B,C,D,E,F)(B65F)16 = 11x163 + 6x162 + 5x161 + 15x160 = (46687)10
1 octal digit = 3 binary digits1 hexa digit = 4 binary digits
conversion(0010 1100 0110 1011. 1111 0000 0110)2 = (2C6B.F06)16
(3A6.C)16 = 0011 1010 0110. 1100 = (1110100110.11)2
6
11/43Number SystemsNumber Systems
Table 1-2 Numbers with Different Bases
12/43Arithmetic OperationsArithmetic OperationsConversion from Decimal to Other Base(Ex1.3) (153)10 = ( ? )8
153/8 = 19 + 1/8 .... 119/8 = 2 + 3/8 .... 32/8 = 0 + 2/8 .... 2
(153)10 = (231)8
(Ex1.5) (0.6875)10 = ( ? )2
0.6875 x 2 = 1.375 .... 10.375 x 2 = 0.75 .... 00.75 x 2 = 1.5 .... 10.5 x 2 = 1.0 .... 1
(0.6875)10 = (0.1011)2
7
13/43Decimal CodesDecimal Codesdecimal number system (people are accustomed to)(vs) binary number system (natural for computer)
2 waysconvert decimal numbers to binary
perform all arithmetic calculation in binaryand then convert the binary results back to decimal
perform the arithmetic operations with decimal numberswhen they are stored in coded form
n-bit binary codea group of n bits up to 2n distinct combinations of 1's & 0's2-bit binary code: 00, 01, 10, 11
BooleanBoolean AlgebraAlgebra
8
15/43Binary Logic and GatesBinary Logic and Gates
Digital circuitshardware components that manipulate binary informationimplemented using transistors and interconnections in ICeach basic circuit is called logic gate
performs a specific logical operation
Boolean Algebramathematical notation to specify the operation of each gateused to analyze and design circuits
16/43Binary Logic and GatesBinary Logic and Gates
Binary Logictake on two discrete values &
with the operations of mathematical logic
three logical operations
1) AND Z = X • Y (Z is equal to X and Y)
2) OR Z = X + Y (Z is equal to X or Y)
3) NOT Z = X' (Z is equal to NOT X)
-- complement operation (0 => 1 & 1 => 0)
AND/OR is similar to multiplication/addition
9
17/43Binary Logic and GatesBinary Logic and Gates
logical OR logical AND logical NOT0 + 0 = 0 0 • 0 = 0 0' = 10 + 1 = 1 0 • 1 = 0 1' = 01 + 0 = 1 0 • 1 = 01 + 1 = 1 1 • 1 = 1
18/43Binary Logic and GatesBinary Logic and GatesLogic Gates
electronic circuits that operate on one or more input signals to produce an output signalvoltage operated circuits: logic 0 & logic 1 intermediate region is crossed during state transition
10
19/43Boolean AlgebraBoolean Algebra
deal with binary variables and logic operations
with three basic logic operations AND, OR, NOTexpress logical relationship between binary variables
Consider F = X + Y' Z represented in a truth tabletransformed from an algebraic expression into a circuit diagram composed of logic gates
(Fig 2.3)
F = X + Y' Z
20/43Boolean AlgebraBoolean Algebra
Basic Identities of Boolean Algebramost basic identities of Boolean algebradual - obtained by interchanging OR and AND,
and replacing 1's by 0's and 0's by 1's
Table 2-3. Basic Identities of Boolean Algebra
11
21/43Standard FormsStandard Forms
Product of Sumsanother standard algebraic expressionobtained by forming a logical product of sum terms
(Ex) F = X(Y'+Z)(X+Y+Z')needs 2 OR gates and one AND gates
22/43Map SimplificationMap Simplification
Karnough map (K-map)to simplify Boolean functions of up to 4 variables(5 or 6 variables can be drawn, but cumbersome to use)a diagram of squares, each representing one mintermsimplified expressions are in sum-of-products or product-of-sums
two-level implementations
12
23/43Map SimplificationMap Simplification
Two-Variable Mapfour minterms for a Boolean function with 2 variables
(Ex)
m1+m2+m3 = X'Y+XY'+XY = X+Y
(by algebra) => X'Y+X(Y'+Y) = X'Y+Y = X+Y
24/43Map SimplificationMap Simplification
Three-variable Map8 minterms for 3 variables
Ex2.3 F(X,Y,Z) = Σ m(2,3,4,5)
(from K-map) F = X'Y + XY'
13
25/43Map SimplificationMap Simplification
Ex2.4 F1(X,Y,Z) = Σ m(3,4,6,7) F2(X,Y,Z) = Σ m(0,2,4,5,6)
(Ex)
F2(X,Y,Z) = Σ m(1,3,4,5,6)= X'Z + XZ' + XY'
or = X'Z + XZ' + Y'Z
26/43LogicLogic GatesGates
Boolean functions are expressed in terms of AND, OR, NOTstraight forward to implement the function with these gatesOther useful logic gates
14
27/43Integrated CircuitsIntegrated Circuits
Integrated Circuits (IC)small silicon semiconductor crystal, called a chipcontains electronic components for the digital gates
Levels of IntegrationSSI (small scale integration), < 10 gatesMSI, 10 ~ 100 gatesLSI, 100 ~ 1000sVLSI, > 1000s
28/43Integrated CircuitsIntegrated Circuits
Digital Logic FamiliesRTL, DTL - earliest logic familiesTTL - widespread, considered as standardECL - high speed operationMOS - high component densityCMOS - low power consumptionBiCMOS - CMOS + TTL, used selectively
Positive and Negative LogicNormal Convention:
Positive Logic/Active HighLow Voltage = 0; High Voltage = 1
Alternative Convention sometimes used: Negative Logic/Active Low
Low Voltage = 1; High Voltage = 0
15
Combinational Logic Design
30/43Combinational CircuitsCombinational Circuits
logic circuits for digital systems: combinational vs sequential
Combinational Circuit (Chap 3)outputs are determined by the present applied inputsperforms an operation, which can be specified logically
by a set of Boolean expressions
Sequential Circuit (Chap 4)logic gates + storage elements (called flip-flops)outputs are a function of the inputs &
bit values in the storage elements (state of storage elements is a function of previous inputs)
output depends on the present values of inputs & past inputs
16
31/43Combinational CircuitsCombinational Circuits
Combinational Circuit (Fig 3.1)consist of input/output variables, logic gates, & interconnectionsn inputs: 2n possible combinationsm outputs: circuit can be described by m Boolean expressionslogic gate transforms binary information from input to outputs
CombinationalCircuit
32/43ExamplesExamples
3 inputs, X, Y, Z; 2 outputs C, S (00 ~ 11)
C is 1 if XY, XZ, or YZ = 11;C is 0 otherwise
Ex) binary adder
17
33/43ExamplesExamples
Ex3.3) BCD to Seven-Segment DecoderLED (light emitting diodes), or LCD (liquid crystal display)accept a decimal digit in BCD & generate the appropriate outputs
outputs (a, b, c, d, e, f, g)7 four-variable maps
34/43Decoders
Decodersa binary code of n bits represents 2n distinct elementsconvert binary info of n coded inputs to 2n (max) unique outputs
n-to-m-line decoders (m < 2n)
generate 2n (or fewer) minterms of n input variables3-to-8-line decoder (3 inputs & 8 outputs)
18
35/43Decoders
36/43Multiplexersselects binary information from one of many input lines,
and directs it to a single output lineNormally, 2n input lines and n selection variables4-to-1-line multiplexer
called data selector or MUX2n-to-1-line multiplexer is constructed from n-to-2n decoder
by adding 2n input lines
19
37/43Binary MultipliersBinary Multipliers
a 2-Bit by 2-Bit Binary Multiplier
Sequential Sequential CircuiCircuit t DesignDesign
20
39/43Sequential Circuit DefinitionsSequential Circuit Definitions
sequential circuitcombinational circuit + storage elementsstorage elements
store binary information state of the sequential circuit at given stateoutputs are a function of the inputs & present state of the storage elementsnext state of storage elements is also a function of the inputs & the present state
40/43Sequential Circuit DefinitionsSequential Circuit Definitions
two typessynchronous sequential circuit
behavior is defined from the knowledge of its signals at discrete instants of time
asynchronous sequential circuitbehavior depends on the inputs at any instance of time & the order in continuous time in which the inputs change,
clock generatorsynchronous sequential circuit has a timing deviceproduce a periodic train of clock pulsesstorage elements are affected only upon the arrival of each pulseclock pulses are applied with other signalsthe outputs can change their value only in the presence of clock pulsesclocked sequential circuits
21
41/43Sequential Circuit DefinitionsSequential Circuit Definitionsflip-flop
storage elements employed in clocked sequential circuitsa binary storage device capable of storing one bit of infoNormally, a sequential circuit uses many flip-flops the transition from one state to the other occurs only at predetermined time intervals dictated by the clock pulsestwo outputs: normal & complemented values
42/43LatchesLatches
A storage element can maintain a binary state indefinitely until directed by an input signal to switch states
Latch most basic types of flip-flops simple & most often used within flip-flopsused with more complex clocking methods
to implement sequential circuits
SR Latch a circuit with 2 cross-coupled NOR (or NAND) gates2 inputs: S (set) & R (reset)
22
43/43FlipFlip--FlopsFlopsCharacteristic Tables
logical properties of a Flip-Flop in tabular formdefine the next state as a function of the inputs and present state
T (toggle) flip-flopwhen inputs J & K are tied togetherwhen T=0 (J=K=0), no changewhen T=1 (J=K=1), toggle the state of F-F