Chapter_01
Chapter_01
• Text Book
– M. M. Mano and M. D. Ciletti, “Digital Design,” 6th Ed., Pearson
Education Limited, 2019.
• Reference
– class notes
• Grade
– quizzes: 15%
– mid-term: 27.5% x 2
– final: 30%
• Course contents
– Chapter 1-10
Chapter 1
Digital Systems and Binary Numbers
Chapter Objectives
• Understand binary number system.
• Know how to Convert between binary, octal, decimal, and
hexadecimal numbers.
• Know how to take the complement and reduced radix
complement of a number.
• Know how to form the code of a number.
• Know how to form the parity bit of a word.
Chapter 1: Digital Systems and Binary Numbers
• Digital age and information age
• Digital computers
– general purposes
– many scientific, industrial and commercial applications
• Digital systems
– telephone switching exchanges
– digital camera
– electronic calculators, PDA's
– digital TV
• Discrete information-processing systems
– manipulate discrete elements of information
Signal
… a5a4a3a2a1.a−1a−2a−3… aj
Decimal point Power
+ 105 a5 + 104 a4 + 103 a3 + 102 a2 + 101 a1 + 100 a0 + 10−1 a−1 + 10−2 a−2 + 10−3 a−3 +
Example:
• Multiplication
Multiplicand 1011
Multiplier × 101
Partial Products 1011
0000 -
1011 - -
Product 110111
Number-Base Conversions
(10 110 001 101 011 . 111 100 000 110) 2 = (26153.7406)8
2 6 1 5 3 7 4 0 6
♣ Conversion from binary to hexadecimal is similar, except that the binary number is
divided into groups of four digits:
Example:
Complements of Numbers
■ Radix Complement
The r's complement of an n-digit number N in base r is defined as rn – N for N ≠ 0
and as 0 for N = 0. Comparing with the (r − 1) 's complement, we note that the r's
complement is obtained by adding 1 to the (r − 1) 's complement, since rn – N = [(rn −
1) – N] + 1.
Example: Base-10
第 位“ 正數
川
, ”
—
o (有謚位 )
— 位 0
↓ of 1101110) = − 0010001.
o 負數
→ 再做 V 的補數
一
一
Signed Binary Numbers
♣ To represent negative integers, we need a notation for negative values.
♣ It is customary to represent the sign with a bit placed in the leftmost position of the
number.
♣ The convention is to make the sign bit 0 for positive and 1 for negative.
Example:
♣ Table 3 lists all possible four-bit signed binary numbers in the three representations.
Signed Binary Numbers
Signed Binary Numbers
■ Arithmetic Addition
The addition of two numbers in the signed-magnitude system follows the rules of
ordinary arithmetic. If the signs are the same, we add the two magnitudes and give
the sum the common sign. If the signs are different, we subtract the smaller
magnitude from the larger and give the difference the sign if the larger magnitude.
♣ The addition of two signed binary numbers with negative numbers represented in
signed-2's-complement form is obtained from the addition of the two numbers,
including their sign bits.
♣ A carry out of the sign-bit position is discarded.
Example:
Binary Codes
■ BCD Code A number with k decimal digits will
require 4k bits in BCD. Decimal 396
is represented in BCD with 12bits as
0011 1001 0110, with each group
of 4 bits representing one decimal
digit. A decimal number in BCD is
the same as its equivalent binary
number only when the number is
between 0 and 9. A BCD number
greater than 10 looks different from
its equivalent binary number, even
though both contain 1's and 0's.
Moreover, the binary combinations
1010 through 1111 are not used
and have no meaning in BCD.
Signed Binary Numbers
■ Arithmetic Subtraction
♣ In 2’s-complement form:
1. Take the 2’s complement of the subtrahend (including the sign bit) and add it to
the minuend (including sign bit).
2. A carry out of sign-bit position is discarded.
( ± A) − ( + B ) = ( ± A) + ( − B )
( ± A) − ( − B ) = ( ± A) + ( + B )
Example:
(11111010 + 00001101)
00000111 (+ 7)
Binary Codes
Example:
Consider decimal 185 and its corresponding value in BCD and binary:
■ BCD Addition
Binary Codes
■ Other Decimal Codes
Binary Codes
■ Gray Code
Binary Codes
■ ASCII Character Code
Binary Codes
■ ASCII Character Code
Binary Codes
■ ASCII Character Code
ASCII Character Codes
• American Standard Code for Information
Interchange (Refer to Table 1.7)
• A popular code used to represent information sent
as character-based data.
• It uses 7-bits to represent:
– 94 Graphic printing characters.
– 34 Non-printing characters
• Some non-printing characters are used for text
format (e.g. BS = Backspace, CR = carriage return)
• Other non-printing characters are used for record
marking and flow control (e.g. STX and ETX start
and end text areas).
ASCII Properties
• A binary cell
– two stable state
– store one bit of information
– examples: flip-flop circuits, ferrite cores, capacitor
• A register
– a group of binary cells
– AX in x86 CPU
■ Register Transfer
♣ a transfer of the information stored in one register to another
♣ one of the major operations in digital system
♣ an example
Transfer of information
• The other major component of a digital system
– circuit elements to manipulate individual bits of information
Binary Logic
■ Definition of Binary Logic
♣ Binary logic consists of binary variables and a set of logical operations. The variables
are designated by letters of the alphabet, such as A, B, C, x, y, z, etc, with each
variable having two and only two distinct possible values: 1 and 0, There are three
basic logical operations: AND, OR, and NOT.
Binary Logic
■ The truth tables for AND, OR, and NOT are given in Table 1.8.
Binary Logic
■ Logic gates
♣ Example of binary signals
Binary Logic
■ Logic gates
♣ Graphic Symbols and Input-Output Signals for Logic gates:
Fig. 1.5
Input-Output signals
for gates
Binary Logic
■ Logic gates
♣ Graphic Symbols and Input-Output Signals for Logic gates: