You are on page 1of 21

Lecture 5:

Combinational Circuits
Part 1
BY
DR.SOHA AHMED EHSSAN
Integrated Circuits
Abbreviated IC
Is a silicon semiconductor crystal called a ship
The various gates are interconnected inside the chip to form the
required circuit
The chip is mounted in a ceramic or plastic container and
connections are welded to external pins to form the integrated
circuits.
Number of pins range from 14 on small IC package to several
thousand on a larger package. 2
Combinational circuits
A combinational circuit consists of:
◦ Input variable
◦ Logic gates
◦ Output variable
For n input variables,
◦ there are 2n possible binary input combinations
◦ For each input combination, there is one possible output variable
Thus, combinational circuit can be specified with a truth table or
Boolean function
3
HOW TO DESIGN A COMBINATIONAL LOGIC
CIRCUIT?
1. From the specifications of the circuit, determine the required
number of inputs and outputs and assign a letter (symbol) to each
2.Derive the truth table that defines the required relationship between
the inputs and outputs
3.Obtain the simplified Boolean functions for each output as a function
of the input variables (using a K-map)
4.Sketch the logic diagram
Half-Adder
A half-adder is one of the most basic combinational logic circuits in computing. It
is used to combine single-digit binary numbers. The half adder produces two
numbers as output: the carry and the sum. The sum is the first digit of the
answer, while the carry is any additional digit. Half adders only work with single
digit inputs.
Consider the example of adding two binary digits together.
Three cases are possible:
▪ 0+0=0
▪ 1 + 0 = 1 or 0 + 1 = 1
▪ 1 + 1 = 1 0 (the result is “0” with a carry of “1”)
In the third case, you have two inputs (the bits to add) and two outputs (the
“sum” and the “carry”).
Half-Adder
Note that each output has a Boolean function.
Thus, we have Sum and Carry functions.

Sum: The sum is “1” when only one of the inputs (x, y) is equal to “1”
This is the job of an XOR!
Sum = 𝑥⊕𝑦

Carry: The carry is “1” when only both inputs (x and y) are “1”
This is the job of an AND!
Carry = xy

The logic diagram of the Half Adder will be:

1 November 2023 TM103 - ARAB OPEN UNIVERSITY 6


Full-Adder
Half adders only work with single digit inputs. When numbers containing more than one digit are to
be combined together, a full adder is used.
A half adder could be extended to a circuit that allows the addition of larger binary numbers: A full-
adder.
Remember how we added binary numbers!
- We add each column without forgetting the carry from the nearest right column
A full-adder has three inputs:
- The two bits to add (x and y)
- The carry from the nearest right column (carry-in)
A full-adder has two outputs (the “sum” and the “carry”)

A full-adder can only add two bits and a carry (three bits)

1 November 2023 TM103 - ARAB OPEN UNIVERSITY 7


Full-Adder

Note that a full-adder is composed of two half-adders and an OR gate.

If you need to add large binary numbers, the simplest way is to use a ripple-carry adder.
A ripple-carry is a succession of full-adders but it is slow. The diagram below shows its
diagram.

1 November 2023 TM103 - ARAB OPEN UNIVERSITY 8


Full-Adder

9
Full-Adder
Binary adder
A binary adder is a digital circuit that produces the arithmetic sum of two n-bit
binary numbers; x = An…A2A1A0 and y =Bn…B2B1B0Example:
Consider x= 1011 and y=0011, their sum=?
= A3A2A1A0 = B3B2B1B0
Must be zero
So, we need a
Subscript i: 3 2 1 0
circuit that:
Add 3 bits, and Input carry 0 1 1 0 Ci
Output: Augend (x) 1 0 1 1 Ai
sum and carry, Addend (y) 0 0 1 1 Bi
Which circuit? Sum 1 1 1 0 S11i
How many?
Output Carry 0 0 1 1 Ci+1
At bit1, inputs?
Binary adder
A n-bit binary adder can be constructed with:
◦ n full adders connected in cascade, with
◦ the output carry from each full adder connected to the input carry of the next full adder in chain

4-bit adder

12
Binary Subtractor
The subtraction of binary numbers can be easily done using
complements
• The subtraction 𝐴−𝐵 is done by taking the 2’s complement of 𝐵 and
adding it to 𝐴
• The 2’s complement can be obtained by taking the 1’s complement
and adding 1 to the least significant bit (LSB)
• The 1’s complement can be implemented easily with an inverter gate
• We can add 1 to the sum by making the initial input carry of the
parallel adder equal to 1
Binary Subtractor
Binary Adder-Subtractor
Binary Adder-Subtractor
M=0 ➔Adder
(B+0=B and C0=0)
M=1 ➔ Subtractor
(B+1=B’ and C0=1)

16
Binary Adder-Subtractor
If the numbers considered to be signed , V bit detects overflow
If V=0, no overflow, the n-bit result is correct
If V=1, overflow occurred and the results contains n+1 bits

17
Overflow
When two numbers with n digits each are added and the sum is a
number occupying n+1 digits
➔ Overflow occurred
It is a problem in digital computers because:
◦ the number of bits that hold the number is finite and
◦ A result that contains n+1 bits can’t be hold by an n bit word

18
Ex: Addition of +50 and +20 = +70,
Carries: 0 0
+50 0 0110010
+20 0 0010100
Overflow +70 0 1000110

Addition of :
Two unsigned numbers, overflow is detected from:
◦ end carry out of MSB (Most Significant Bit)

Two signed numbers both positive or negative, overflow can be detected by:
◦ observing the carry into the sign bit and the carry out of the sign bit.
◦ If these two carries are not equal, an overflow has occurred

Ex: Addition of +70 and +80 = +150, while 8-bit location can hold
a range from +127 to -128
Carries: 0 1 carries: 10
+70 0 1000110 -70 1 0111010
+80 0 1010000 -80 1 0110000 19
+150 1 0010110 -150 0 1101010
Binary Multiplier
2 bits × 2 bits = max 4 bits
(11)2 ×(11) 2 =(1001) 2
(3) 10×(3) 10=(9) 10

You might also like