Beruflich Dokumente
Kultur Dokumente
ICS 30/CS 30
DIGITAL DESIGN
logic design switching circuits digital logic digital systems
mariaramilaisidrojimenez
XUCC
DIGITAL DESIGN
digital computers electronic calculators digital control devices digital communication equipment many other applications that require electronic digital hardware
mariaramilaisidrojimenez
XUCC
DIGITAL DESIGN
SSI circuits contain several gates or flipflops in a single package MSI devices provide specific digital functions LSI devices provide complete computer modules
mariaramilaisidrojimenez
XUCC
DIGITAL SYSTEMS
general-purpose digital computer
Best-known example of a digital system
telephone switching exchanges digital voltmeters frequency counters calculating machines teletype machines
XUCC
mariaramilaisidrojimenez
DIGITAL SYSTEMS
Its manipulation of discrete elements of info. electric impulses decimal digits letters of an alphabet arithmetic operations punctuation marks any other set of meaningful symbols
XUCC
mariaramilaisidrojimenez
DIGITAL SYSTEMS
A sequence of discrete elements forms a language, i.e. a discipline that conveys info. discrete information processing system Discrete elements of info. are represented in a digital system by physical quantities called signals. Electrical signals such as voltages and currents are the most common.
mariaramilaisidrojimenez XUCC
DIGITAL SYSTEMS
Digital systems that are constrained to take discrete values are further constrained to take binary values. An analog computer performs a direct simulation of a physical system* The term analog signal is sometimes substituted for continuous signal because analog computer has come to mean a computer that manipulates continuous variables.
mariaramilaisidrojimenez XUCC
DIGITAL SYSTEMS
Control Unit
Processor
or Arithmetic Unit
Storage
or
Memory Unit
Input
Devices
mariaramilaisidrojimenez
Output
Devices
XUCC
and Control
and Control
DIGITAL SYSTEMS
An electronic calculator is a digital system similar to a digital computer, why? A digital computer, however, is a more powerful device than a calculator, how? A digital computer is an interconnection of digital modules.
mariaramilaisidrojimenez
XUCC
DIGITAL SYSTEMS
A processor when combined with the control unit, forms a component referred to as a central processing unit or CPU A CPU enclosed in a small IC package is called a microprocessor A CPU combined with memory and interface control to form a small-size computer is called a microcomputer
mariaramilaisidrojimenez XUCC
BINARY SYSTEM
Operands used for calculations may be expressed in the binary number system. Other discrete elements, including the decimal digits, are represented in binary codes Data processing is carried out by means of binary logic elements using binary signals Quantities are stored in binary storage elements
mariaramilaisidrojimenez XUCC
mariaramilaisidrojimenez
XUCC
Decim al Numbe r 0
10
1 1 11 2 2 12 3 3 13
19
13
28
1C
20
14
29
1D
21
15
30
1E
22
16
31
1F
14
23
17
15
24
18
16
10
25
19
mariaramilaisidrojimenez
17
11
XUCC
26
1A
BINARY SYSTEM
Binary Subtraction by Complementing Complement arithmetic has particular appeal in the case of the binary system since to obtain the inverse of binary numbers no subtraction is required, only bit inversion.
mariaramilaisidrojimenez
XUCC
BINARY SYSTEM
Subtraction is accomplished by adding the complement of the number to be subtracted. The equivalent of the 9s complement is the 1s complement. The 1s complement of a binary number is simply the difference between 1 and each of the digits of the number.
mariaramilaisidrojimenez
XUCC
BINARY SYSTEM
Complementing in the binary system simply consists of putting down a 1 for a 0 and a 0 for a 1. Thus the complement of 11010 is 00101, and the complement of 11110 is 000001. To subtract by complementing in the binary system, you add the 1s complement plus 1, and ignore the initial 1.
mariaramilaisidrojimenez XUCC
BINARY SYSTEM
Binary Multiplication The rule for decimal multiplication also holds for binary multiplication. In fact, binary multiplication is simpler since multiplying a number by the bit 0 or 1 yields respectively 0 or the number. In any number system, multiplication consists of adding a number to itself as many times as is specified by the multiplier.
mariaramilaisidrojimenez XUCC
BINARY SYSTEM
Binary Division As in the decimal system, division is the inverse of multiplication and division by zero is similarly meaningless. Division is defined as the process of determining how many times one number, the divisor, can be subtracted from another number, the dividend, while still leaving a positive remainder. The number of times this can be done is the result, or quotient.
mariaramilaisidrojimenez XUCC
COMPLEMENTS
Complements are used in digital computers for simplifying the subtraction operation and for logical manipulations 2 types for each base-r system
1) rs complement 2) (r-1)s complement
mariaramilaisidrojimenez
XUCC
COMPLEMENTS
The rs Complement Given a positive number N in base r with an integer part of n digits, the rs complement of N is defined as rn N for N 0 and 0 for N=0.
mariaramilaisidrojimenez
XUCC
COMPLEMENTS
The (r-1)s Complement Given a positive number N in base r with an integer part of n digits and a fraction part of m digits, the (r-1)s complement of N is defined as rn r -m N.
mariaramilaisidrojimenez
XUCC
COMPLEMENTS
The rs complement of N is rn N and the complement of (rn N) is rn (rn N) = N Subtraction w/ rs complements The subtraction of two positive numbers ( M - N), both of base r, may be done as follows: 1. add the minuend M to the rs complement of the subtrahend N.
mariaramilaisidrojimenez XUCC
COMPLEMENTS
2. Inspect the result obtained in step 1 for an end carry: (a) If an end carry occurs discard it. (b) If an end carry does not occur, take the rs complement of the number obtained in step 1 and place a negative sign in front.
mariaramilaisidrojimenez
XUCC
COMPLEMENTS
Subtraction w/ (r-1)s complements The subtraction of ( M - N), both positive numbers in base r, may be done as follows: 1. add the minuend M to the (r-1)s complement of the subtrahend N.
mariaramilaisidrojimenez
XUCC
COMPLEMENTS
2. Inspect the result obtained in step 1 for an end carry: (a) If an end carry occurs, add 1 to the least significant digit (end-around carry). (b) If an end carry does not occur, take the (r-1)s complement of the number obtained in step 1 and place a negative sign in front.
mariaramilaisidrojimenez XUCC
COMPLEMENTS
Comparison between 1s and 2s Complements 1s complement
easier to implement by digital components since the only thing that must be done is to change 0s to 1s and 1s into 0s.
2s complement
may be obtained in two ways: (1) By adding 1 to the least significant digit of the 1s complement
mariaramilaisidrojimenez XUCC
COMPLEMENTS
Comparison between 1s and 2s Complements 2s complement (2) by leaving all leading 0s in the least significant positions and the first 1 unchanged, and only then changing all 1s into 0s and all 0s into 1s. During subtraction of two numbers by complements, the 2s complement is advantageous only one arithmetic addition operation is required
mariaramilaisidrojimenez XUCC
COMPLEMENTS
Comparison between 1s and 2s Complements 1s complement - requires two arithmetic additions when an end-around carry occurs.
1s complement has the additional disadvantage of possessing two arithmetic zeros: one w/ all 0s and one w/ all 1s.
mariaramilaisidrojimenez
XUCC
COMPLEMENTS
Comparison between 1s and 2s Complements
Consider the subtraction of two equal binary numbers 1100-1100 = 0
Using 1s complement: 1100 + 0011 + 1111
COMPLEMENTS
Comparison between 1s and 2s Complements
While the 2s complement has only one arithmetic zero, the 1s complement zero can be positive or negative, which may complicate matters. 1s complement is also useful in logical manipulations, since the change of 1s to 0s and vice versa is equivalent to a logical inversion operation.
mariaramilaisidrojimenez XUCC
COMPLEMENTS
Comparison between 1s and 2s Complements The 2s complement is used only in conjunction with arithmetic applications. Consequently, it is convenient to adopt the ff. convention: When the word complement, w/o mention of the type, is used in conjunction with a nonarithmetic application, the type is assumed to be the 1s complement.
mariaramilaisidrojimenez
XUCC