digital logic designanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · decimal...
TRANSCRIPT
![Page 1: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/1.jpg)
DIGITAL LOGIC DESIGN
BINARY SYSTEMS
![Page 2: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/2.jpg)
DIGITAL SYSTEMS
� Prominent Role in Everyday Life
� Present Technological Period is called Digital Age
� Used in Communication, Business Transactions,Traffic Control, Space Guidance, MedicalTreatment, Weather Monitoring Etc.
� Ex: DTH, DVD’s, Digital Cameras, DigitalPhones, Digital Computers Etc.
� Most important Properties of a Digital Computeris its generality and Flexibility
![Page 3: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/3.jpg)
DIGITAL SYSTEMS
� One Characteristic of digital systems is their
ability to manipulate discrete elements of
information
� Ex: 10 decimal digits, 26 alphabets, 52 Playing
Cards Etc.
� The Term Digital Emerged from the word Digit
� Discrete elements of information are represented
in a digital system by physical quantities called
signals (Voltage & Current)
![Page 4: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/4.jpg)
DIGITAL SYSTEMS
� Signals in present day digital systems use twodiscrete values (0 & 1bits) are said to be binary
� Discrete elements of information are representedwith groups of bits called binary codes
� Digital System is a system that manipulatesdiscrete elements of information that isrepresented internally in binary form
� This discrete information emerges from nature ofdata being processed or may be quantized fromcontinuous process
![Page 5: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/5.jpg)
DIGITAL SYSTEMS
� Best Example for a digital system is “Digital
Computer”
� Fundamental Reasons why Commercial Systems
are made with Digital Circuits –
�Most devices are programmable
�Changing the programming , same H/W can be
used for multiple applications
�Cost reductions due to advances in DIC Technology
�Speed
![Page 6: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/6.jpg)
DIGITAL SYSTEMS
�Operate with extreme reliability by using errorcorrecting codes
�Ex: Recording in a DVD
�Digital Systems also termed as interconnection ofdigital modules
�Can be designed using HDL’s which resemblesprogramming language and is suitable fordescribing digital circuits in textual form, simulatesa digital system to verify its operation and used inconjunction with logic synthesis tools to automatedesign
![Page 7: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/7.jpg)
BINARY NUMBERS
� Decimal point is represented by a series of coefficientsA
5A
4A
3A
2A
1A
0.A
-1A
-2A
-3
� Aj coefficients are any of 10 digits and J gives the place
value and hence the value power of 10 by which the
coefficient must be multiplied, given by 105A5 + 104A4 + 103A3
+ 102A2 + 101A1 + 100A0 + 10-1A-1 + 10-2A-2 + 10-3A-3
� Decimal number system is said to be of base or radix
10 as it uses 10 digits and coefficients are multiplied by
powers of 10
� In Binary System, Coefficients of binary values (0 and
1) Aj is multiplied by 2j
� Ex:24 x 1 + 23 x 1 + 22 x 0 + 21 x 0 + 20 x 0 + 2-1 x 1 + 2-2 x 1 = 26.75
![Page 8: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/8.jpg)
BINARY NUMBERS
� Convert the following to Decimal Numbers
� (4021.2)5
� (127.4)8
� (B65F)16
� (110101)2
![Page 9: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/9.jpg)
BINARY NUMBERS
� In Computer Terminology
�210 Kilo
�220 Mega
�230 Giga
�240 Tera
� Computer Capacity is given in Bytes
� Byte is equal to eight bits and can accommodate
one keyboard character
![Page 10: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/10.jpg)
BINARY NUMBERS
� Arithmetic Operations with numbers in base r
follows the same rules as for decimal numbers
� Ex: Augend: 101101
Addend: 100111
-----------
1010100
![Page 11: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/11.jpg)
COMPLEMENTS
� Used in digital computers for simplifying thesubtraction operation and for logical manipulation
� Two types of complements for each base-r system
�Radix Complement (r’s Complement)
�Diminished Radix Complement (r-1’s Complement)
�DRC - Given a number N in base r having n digits(r-1)’s complement of N is defined as (rn-1) – N
�Ex: 9’s Complement of 546700 is (106 – 1) – 546700= 453299
![Page 12: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/12.jpg)
COMPLEMENTS
� Radix Complement – r’s complement of an n digit
number N in base r is defined as rn – N for N ≠ 0
and 0 for N = 0
� Ex: 10’s Complement of 012398 is 106 – 012398 =
987602
� Complement of a complement restores the original
value
![Page 13: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/13.jpg)
COMPLEMENTS
� Subtraction with Complements
� When normal subtraction is implemented on H/Wit is less significant
�Procedure using Complements
�Add the minuend, Mm to the r’s complement of thesubtrahend, N. This performs M + (rn – N) = M – N+ rn
� If M ≥ N, sum will produce an end carry, rn, whichcan be discarded; what is left is M-N
� If M < N, sum does not produce an end carry and isequal to rn – (N-M), which is complement of N-M
![Page 14: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/14.jpg)
COMPLEMENTS
� Ex: Using 10’s Complement subtract 3250 from72532
M = 72532
10’s Complement of N = 96750
Sum = 169282
Discard end Carry 105 = -100000
Answer = 69282
When subtracting with complements, negativeanswer is recognized from absence of end carryand complemented result
![Page 15: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/15.jpg)
COMPLEMENTS
� Exercise
�X = 1010100; Y = 1000011; Perform subtraction
(a) X – Y (b) Y – X using 2’s Complements and
repeat with 1’s Complements
�M = 3250; N = 72532; Perform subtraction M – N
using 10’s Complement and 9’s Complement
![Page 16: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/16.jpg)
Signed Binary Numbers
� Positive numbers (including Zero) are represented
as unsigned numbers
� Normal negative numbers are represented by
Minus sign
� Because of hardware limitations, computers must
represent everything with binary digits
� Sign Bit 0 for positive and 1 for negative
� Represented at the left most position
![Page 17: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/17.jpg)
Signed Binary Numbers
� Need to be able to represent both positive andnegative numbers - Following 3 representations
� Example: Represent +9 and -9 in 7 bit-binarynumber
Only one way to represent +9 ==> 0 001001
Signed magnitude representation
Signed 1's complement representation
Signed 2's complement representation
![Page 18: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/18.jpg)
Signed Binary Numbers
� Three different ways to represent -9:
� In signed-magnitude: 1 001001
� In signed-1's complement: 1 110110
� In signed-2's complement: 1 110111
� In general, in computers, fixed point numbers arerepresented either integer part only or fractionalpart only
![Page 19: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/19.jpg)
ARITHMETIC ADDITION: SIGNED MAGNITUDE
� Compare their signs
� If two signs are the same , ADD the two magnitudes -
Look out for an overflow
� If not the same , compare the relative magnitudes of
the numbers and then SUBTRACT the smaller from
the larger --> need a subtractor to add
� Determine the sign of the result
![Page 20: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/20.jpg)
ARITHMETIC ADDITION: SIGNED MAGNITUDE
6 0110
+) 9 1001
15 1111 -> 01111
9 1001
- ) 6 0110
3 0011 -> 00011
9 1001
-) 6 0110
- 3 0011 -> 10011
6 0110
+) 9 1001
-15 1111 -> 11111
6 + 9 -6 + 9
6 + (- 9) -6 + (-9)
Overflow9 1001
+) 9 1001(1)0010
![Page 21: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/21.jpg)
ARITHMETIC ADDITION: SIGNED 2’s COMPLEMENT
� Add the two numbers, including their sign bit, and
discard any carry out of leftmost (sign) bit - Look
out for an overflow
Example6 0 0110
9 0 1001
15 0 1111
-6 1 1010
9 0 1001
3 0 0011
6 0 0110
-9 1 0111
-3 1 1101
-9 1 0111
-9 1 0111
-18 (1)0 1110
overflow9 0 10019 0 1001 2 operands have the same
signand the result sign changesxn-1yn-1s’n-1 + x’n-1y’n-1sn-1 =cn-1⊕⊕⊕⊕ cn
x’n-1y’n-1sn-1
(cn-1 cn)
xn-1yn s’n-1
(cn-1 cn)
18 1 0010
![Page 22: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/22.jpg)
ARITHMETIC ADDITION: SIGNED 1’s
COMPLEMENT
� Add the two numbers, including their sign bits.
� If there is a carry out of the most significant (sign) bit, the result is incremented by 1 and the carry is discarded.
6 0 0110
-9 1 0110
-3 1 1100
-6 1 1001
9 0 1001
(1) 0(1)0010
1
3 0 0011
+) +)
+)
end-around carry
-9 1 0110-9 1 0110
(1)0 11001
0 1101
+)
+)
9 0 10019 0 1001
1 (1)0010
+)
overflow
Example
(cn-1 ⊕ ⊕ ⊕ ⊕ cn)
![Page 23: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/23.jpg)
COMPARISON OF REPRESENTATIONS
� Easiness of negative conversion
�S + M > 1’s Complement > 2’s Complement
� Hardware
�S+M: Needs an adder and a subtractor forAddition
�1’s and 2’s Complement: Need only an adder
� Speed of Arithmetic
�2’s Complement > 1’s Complement(end-around C)
� Recognition of Zero
�2’s Complement is fast
![Page 24: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/24.jpg)
ARITHMETIC SUBTRACTION
� Arithmetic Subtraction in 2’s complement
�Take the complement of the subtrahend (including
the sign bit) and add it to the minuend including
the sign bits.
( ±±±± A ) - ( - B ) = ( ±±±± A ) + B
( ±±±± A ) - B = ( ±±±± A ) + ( - B )
![Page 25: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/25.jpg)
BINARY CODES� BCD CODE
� Convert the decimal numbers to binary, perform
all the arithmetic operations in binary and convert
all the binary results back to decimal
Decimal BCD
Code
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
![Page 26: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/26.jpg)
BINARY CODES
� Decimal 396 is represented in BCD with 12 bits as
0011 1001 0110, with each group of 4bits
representing one decimal digit
� BCD numbers requires more bits than its binary
equivalent
� BCD numbers are decimal numbers and not
binary numbers even though they use bits in their
representation
![Page 27: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/27.jpg)
BINARY CODES
� BCD ADDITION
� Consider addition of two decimal digits in BCD,together with a possible carry from a previous lesssignificant pair of digits
� Since each digit does not exceed 9, sum cannot begreater than 9+9+1 = 19, with 1 in the sum being usedas a previous carry
� If we add BCD digits as if they are binary digits,binary sum will produce a result in the range from 0 to19.
� Binary result will be from 0000 to 10011 and for BCDit is 0000 to 1 1001
![Page 28: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/28.jpg)
BINARY CODES
� Example: Add BCD numbers 184 and 576
1 1
187 = 0001 1000 0111
576 = 0101 0111 0110
____ ____ ____
0111 1111 1101
0110 0110
------ --------------------
760 0111 0110 0000
Invalid BCD Number
![Page 29: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/29.jpg)
BINARY CODES
� Decimal Arithmetic
� Representation of signed decimal numbers in BCD
is similar to binary
� Sign Magnitude / Sign Complement methods can
be used
� ‘+’ is represented as 0000 and ‘-’ is represented
with BCD equivalent of 9 i.e., 1001
� To obtain 10’s complement in BCD, we take 9’s
complement first and then add ‘1’ to LSB
![Page 30: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/30.jpg)
BINARY CODES
� Procedures used for signed 2’s complement is alsoapplicable for signed 10’s complement
� Addition is done adding all the digits includingsign bit and discarding end carry which assumesthat all –ve numbers are in 10’s complement form
� Ex: 0 375
+9 760
----------------
0 135
![Page 31: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/31.jpg)
BINARY CODES
� Other Decimal Codes
� Codes can be formulated by arranging four bits in10 distinct possible combinations
� Weighted Codes: BCD, 2421 code
� Non Weighted Codes: Excess-3, 8 4 -2 -1 code
� In Weighted code, each bit position is assigned aweighting factor in such a way that each digit canbe evaluated by adding the weights of all 1’s in thecoded combination
� 2421 and Excess-3 are examples of selfcontemplating codes
![Page 32: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/32.jpg)
BINARY CODES
� Self Contemplating codes has the property that 9’s
complement of a decimal number is obtained
directly by changing 1’s to 0’s and 0’s to 1’s in the
code
� Ex: 395 – 0110 1001 0101 (BCD Equivalent)
� Excess-3 Equivalent of 395 = 0110 1100 1000
� 9’s Complement of 395 = 1001 0011 0111
![Page 33: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/33.jpg)
BINARY CODES
Decimal BCD(8421) 2421 84-2-1 Excess-3
0 0000 0000 0000 0011
1 0001 0001 0111 0100
2 0010 0010 0110 0101
3 0011 0011 0101 0110
4 0100 0100 0100 0111
5 0101 1011 1011 1000
6 0110 1100 1010 1001
7 0111 1101 1001 1010
8 1000 1110 1000 1011
9 1001 1111 1111 1100
![Page 34: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/34.jpg)
BINARY CODES
� Gray Code
� Sometimes beneficiary to use to represent digitaldata when it is converted from analog data
� Advantage is that only one bit in the code groupchanges when going from one number to the next
� Ex: When going from 7 to 8, the gray codechanges from 0100 to 1100. only first bit changesfrom 0 to 1
� Used where the normal sequence of binarynumbers may produce an error or ambiguitywhen transiting from one number to next
![Page 35: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/35.jpg)
BINARY CODES
Decimal
number
Gray Binary
g3 g2 g1 g0 b3 b2 b1 b0
0 0 0 0 0 0 0 0 0
1 0 0 0 1 0 0 0 1
2 0 0 1 1 0 0 1 0
3 0 0 1 0 0 0 1 1
4 0 1 1 0 0 1 0 0
5 0 1 1 1 0 1 0 1
6 0 1 0 1 0 1 1 0
7 0 1 0 0 0 1 1 1
8 1 1 0 0 1 0 0 0
9 1 1 0 1 1 0 0 1
10 1 1 1 1 1 0 1 0
11 1 1 1 0 1 0 1 1
12 1 0 1 0 1 1 0 0
13 1 0 1 1 1 1 0 1
14 1 0 0 1 1 1 1 0
15 1 0 0 0 1 1 1 1
![Page 36: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/36.jpg)
BINARY CODES
� ASCII Character Code
ASCII (American Standard Code for Information Interchange) Code
![Page 37: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/37.jpg)
BINARY CODES
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
NUL
SOH
STX
ETX
EOT
ENQ
ACK
BEL
BS
HT
LF
VT
FF
CR
SO
SI
SP
!
“
#
$
%
&
‘
(
)
*
+
,
-
.
/
0
1
2
3
4
5
6
7
8
9
:
;
<
=
>
?
@
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
[
\
]
m
n
‘
a
b
c
d
e
f
g
h
I
j
k
l
m
n
o
b4b3b2b1b0 0 1 2 3 4 5 6 7
DLE
DC1
DC2
DC3
DC4
NAK
SYN
ETB
CAN
EM
SUB
ESC
FS
GS
RS
US
P
q
r
s
t
u
v
w
x
y
z
{
|
}
~
DEL
b7b6b5
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
![Page 38: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/38.jpg)
BINARY CODESNUL Null
SOH Start of Heading (CC)
STX Start of Text (CC)
ETX End of Text (CC)
EOT End of Transmission (CC)
ENQ Enquiry (CC)
ACK Acknowledge (CC)
BEL Bell
BS Backspace (FE)
HT Horizontal Tab. (FE)
LF Line Feed (FE)
VT Vertical Tab. (FE)
FF Form Feed (FE)
CR Carriage Return (FE)
SO Shift Out
SI Shift In
DLE Data Link Escape (CC)
(CC) Communication Control
(FE) Format Effector
(IS) Information Separator
DC1 Device Control 1
DC2 Device Control 2
DC3 Device Control 3
DC4 Device Control 4
NAK Negative Acknowledge (CC)
SYN Synchronous Idle (CC)
ETB End of Transmission Block (CC)
CAN Cancel
EM End of Medium
SUB Substitute
ESC Escape
FS File Separator (IS)
GS Group Separator (IS)
RS Record Separator (IS)
US Unit Separator (IS)
DEL Delete
![Page 39: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/39.jpg)
BINARY CODES
� Alphanumeric character set is a set of elementsthat includes the 10 digits, 26 letters of alphabetsand a number of special characters
� Such set contains 36-64 elements if only capitalletters are included or 64-128 if both lower andupper case letters
� In first case we need binary code of 6 bits and insecond case we need binary code of 7 bits
� Standard binary code for alphanumericcharacters is ASCII
![Page 40: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/40.jpg)
BINARY CODES
� Ex: Letter ‘A’ represented in ASCII as 1000001
(Colum 100 and Row 0001)
� ASCII code contains 94 graphic characters (26
uppercase letters, 26 lowercase letters, 10
numerals, 32 special printable characters like %,
$, * etc.) that can be printed and 34 non printing
characters used for various controls functions
(Abbreviated names)
� Control characters are used for routing data and
arranging printed text into prescribed format
![Page 41: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/41.jpg)
BINARY CODES
� Control Characters – 3Types
�Format Effectors (control layout of printing – Back
Space, Horizontal Tabulation, Carriage Return)
� Information Separators (Separate data into
divisions such as Paragraphs and Pages)
�Communication Control (Useful during
transmission of text between remote terminals)
� ASCII is 7-bit code, but most computers
manipulate 8-bit quantity as a single unit
![Page 42: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/42.jpg)
BINARY CODES
� Error Detecting Code
� Simplest method for error detection
� One parity bit attached to the information
� Even Parity and Odd Parity
� Even Parity
� One bit is attached to the information so that the total number of 1 bits is an even number
� 1011001 0
� 1010010 1
� Odd Parity
� One bit is attached to the information so that the total number of 1 bits is an odd number
� 1011001 1
� 1010010 0
![Page 43: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/43.jpg)
BINARY CODES
� Parity bit is helpful in detecting errors during
transmission of information from one location to
another.
� Detects one, three or any odd combination of
errors in each character that is transmitted. Even
Combination is undetected
![Page 44: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/44.jpg)
Binary Storage and Registers
� Binary cell is a device that possesses two stable
states and is capable of storing one bit of
information
� Register – Group of binary cells
� A register with n cells can store any discrete
quantity of information that contains n bits
� State of register is an n-tuple number of 1’s and
0’s, with each bit designating the state of one cell
![Page 45: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/45.jpg)
Binary Storage and Registers
� Ex: 16 bit register – 1100001111001001
� A register with 16 cells can be in one of the 2n possiblestate
� Register can store discrete elements of information andthat the same bit configuration ma be interpreteddifferently for different type of data
� Register Transfer –
�Basic operation in digital systems consistingtransfer of binary information from one register toanother register.
�Transfer may be direct or indirect
![Page 46: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/46.jpg)
Binary Storage and Registers
![Page 47: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/47.jpg)
Binary Storage and Registers
![Page 48: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/48.jpg)
Binary Logic
� Consists of binary variables and logic operations
� Variables designated by letters of alphabets like A,B, C, x, y, z etc., with each variable having two andonly two distinct possible values: 1 and 0
� 3 Basic Logical operations: AND, OR and NOT
�AND (.) – x.y = z or xy = z (x and y = z)
�OR (+) – x+y = z (x or y =z)
�NOT (‘ or ~) – x’ = z (x is not equal to z)
� Binary Logic is different from binary arithmetic
![Page 49: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/49.jpg)
Binary Logic
� For each combination of x and y, there is a value z
specified by definition of logic operation
� Definitions listed in compact form using Truth
Table
� Truth Table is a Table of all possible combinations
of the variables showing the relation between
values that the variables may take and the result
of operation
![Page 50: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/50.jpg)
Binary Logic
A B A+B
0 0 0
0 1 1
1 0 1
1 1 1
A B A*B
0 0 0
0 1 0
1 0 0
1 1 1
a A
0 1
1 0
![Page 51: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/51.jpg)
Binary Logic
� Logic Gates are electronic circuits that operate on one
or more input signals to produce an output signal
� The input terminals of digital circuits accept binary
signals within allowable range and respond at the
output terminals with binary signals that fall within
specific range
� Timing diagrams illustrate response of each gate to the
four input signal combinations
� Horizontal axis – Time; Vertical Axis – Signal changes
between two possible voltage levels
![Page 52: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/52.jpg)
Binary Logic
![Page 53: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/53.jpg)
Binary Logic
![Page 54: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/54.jpg)
Binary Logic
![Page 55: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/55.jpg)
Binary Logic
![Page 56: DIGITAL LOGIC DESIGNanandsrys.weebly.com/uploads/2/3/9/6/23968450/binary_systems.pdf · Decimal point is represented by a series of coefficients A5A4A3A2A1A0.A-1A-2A-3 Aj coefficients](https://reader033.vdocument.in/reader033/viewer/2022042209/5ead72d0e4b6650eb611b8a4/html5/thumbnails/56.jpg)
� END OF UNIT - I