Chapter 1 - New 11
Chapter 1 - New 11
• Recommended Textbook
Digital Design with an Introduction To The VERILOG HDL , by M.Morris Mano & Michael
D. Ciletti, 5th edition, Pearson, 2013.
• Course Description
This course focuses on the fundamental constructs and concepts underlying computer
hardware and software which includes number systems, binary arithmetic, codes,
Boolean algebra, gates, Boolean expressions
Gate Minimization
◆ The Map Method.
◆ Two, three, and four variable maps.
◆ PoS, SoP simplification.
◆ Don’t care conditions. NAND/NOR implementation.
◆ Exclusive-OR Function.
Combinational Logic
◆ Analysis and design of combinational circuits.
◆ Full/half Adder
Chapter 1
Digital Systems and Binary
Numbers
1. Digital Systems
2. Binary Numbers
3. Number-base Conversions
4. Octal and Hexadecimal Numbers
Digital Systems
◆ Digital camera
Digital computers
◆ General purpose.
◆ Many scientific, industrial, and commercial applications.
Discrete elements
◆ Electric impulses
◆ Arithmetic operations
For example, {1, 2, 3, …} and {A,
B, C, …}…
Digital Systems
Analog system
The physical quantities or signals may vary continuously over a specified range.
Digital system
1. Digital Systems
2. Binary Numbers
3. Number-base Conversions
4. Octal and Hexadecimal Numbers
Decimal Number System
Base = 2
◆ 2 digits { 0, 1 }, called binary digits or “bits”
Weights
◆ Weight = (Base) Position
Magnitude
◆ Sum of “Bit x Weight”
Formal Notation
Groups of bits
The Power of 2
Octal Number System
Base = 8
◆ 8 digits { 0, 1, 2, 3, 4, 5, 6, 7 }
Weights
◆ Weight = (Base) Position
Magnitude
◆ Sum of “Digit x Weight”
Formal Notation
Hexadecimal Number System
Base = 16
◆ 16 digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F }
Weights
◆ Weight = (Base) Position
Magnitude
◆ Sum of “Digit x Weight”
Formal Notation
Outline of Chapter 1
1. Digital Systems
2. Binary Numbers
3. Number-base Conversions
4. Octal and Hexadecimal Numbers
Number Base Conversions
Conversion form any base to Decimal (Evaluate magnitude)
Conversion form any base to Decimal (Evaluate magnitude)
To convert a decimal integer into any base, keep dividing by r until the quotient is 0. Collect
the remainders in reverse order.
To convert a fraction, keep multiplying the fractional part by r until it becomes 0 or until we reach
the required accuracy. Collect the integer parts in forward order.
Decimal (Integer) to Binary Conversion
Line up the numbers from right to left. If one number is shorter extend
it by adding leading zeros to the number.
Work from right to left - doing the same addition and carry
operation in each column.
Add the two digits in the same column and also add the carry at the
top of the column (if any).
◆ The digits may be A,B,C…etc and if so, mentally convert
them to decimal before adding.
◆ Remember to record a carry digit as explained below - even if it is
zero.
◆ Keep the decimal sum in your head - or write it down on some
scratch paper.
Procedure to add two base-r numbers
Q. What is 1 + 1 + 1 = ?
A. The answer is 1 carry 1.
Another Example:
Q. What is1–1–1=?
A. The answer is 1 borrow 1.
Explanation: We perform the operation in 2 steps: 1 – 1 = 0
We then subtract 1 from the above result, i.e. 0 – 1 which is
1 borrow 1.
Q. What is 0 – 1 – 1 = ?
A. The answer is 0 borrow 1. Explanation: We perform the
operation 0 - 1= 1 borrow 1
We then subtract 1 from the above result, which yields 0
borrow 1.
Example :
Complements
11111111
Complements
OR Toggle all bits to the left of the first ‘1’ from the right( least significant 1)
Binary Subtraction Using 1’s Complements
The subtraction of two n bit unsigned binary numbers X –Y using the 1’s complement can be
done as follows:
• Take the 1’s complement of the subtrahend Y and add it to the minuend X.
If X >= Y, the sum will produce and end carry at position 2n, which is added to LSB of the sum. This operation is
called end a round carry.
If X < Y, the sum does not produce an end carry. To obtain the answer in a familiar form, take the 1’s complement of
the sum and place a negative sign in front.
Binary Subtraction Using 1’s Complement
Example:
Binary Subtraction Using 1’s Complement
Example :
Given the two binary numbers X = 1101 and Y = 10, perform the subtraction X – Y by using
1's complement.
1101 – 10 = 1011
Binary Subtraction Using 1’s Complement
• Take the 2’s complement of the subtrahend Y and add it to the minuend X.
• If X >= Y, the sum will produce and end carry at position 2n, which can be
discarded; what is left is the result X – Y.
• If X < Y, the sum does not produce an end carry. To obtain the answer in a familiar
form, take the 2’s complement of the sum and place a negative sign in front.
Binary Subtraction Using 2’s Complement
Example
Given the two binary numbers X = 1010100 and Y = 1000011, perform the
subtraction (a) X – Y ; and (b) Y X, by using 2's complement.
Examples:
Q 1. Given the two binary numbers X = 1001 and Y = 0101, perform the
Q 2. Given the two binary numbers X = 1010010 and Y = 11100100, perform the
Registers are fast storage devices used inside processors Used to store computation
results of a running program
A Register consists of a fixed number of storage bits
Signed-2’s Complement representation: 11110111 All three use the left most bit to represent the sign:
» ‘0’ positive
» ‘1’ negative