CA Unit 1
CA Unit 1
SYSTEM
What is Number System?
Number System
2
Decimal Number
System
1 3
Decimal Number System
◉ Decimal number system is a base 10 number system having 10
digits from 0 to 9.
◉ This means that any numerical quantity can be represented using
these 10 digits.
◉ Decimal number system is also a positional value system.
◉ This means that the value of digits will depend on its position
◉ Say we have three numbers – 734, 971 and 207. The value of 7 in all three numbers
is different−
◉ In 734, value of 7 is 7 hundreds or 700 or 7 × 100 or 7 × 10 2
◉ In 971, value of 7 is 7 tens or 70 or 7 × 10 or 7 × 10 1
◉ In 207, value 0f 7 is 7 units or 7 or 7 × 1 or 7 × 10 0
4
Binary Number
System
2 5
Binary Number System
◉ The easiest way to vary instructions
through electric signals is two-state
system – on and off.
◉ On is represented as 1 and off as 0, In any binary number, the rightmost digit is called least
significant bit (LSB) and leftmost digit is called most
though 0 is not actually no signal but significant bit (MSB).
signal at a lower voltage.
◉ The number system having just these
two digits – 0 and 1 – is called binary
number system.
6
Octal Number System
3 7
Octal Number System
8
Hexa Decimal
Number System
4 9
Hexadecimal Number System
10
Binary to Decimal
11
Binary to Decimal
12
Binary to Decimal
◉ Step 2: Now multiply each digit in the binary number starting from
the right with its respective weight based on its position and
evaluate the product.
13
Exercises
14
Decimal to Binary
Decimal to Then, the remainders are
binary conversion is noted down till we get 0
done through various as the final quotient.
methods. One of the After this step, these
methods to convert remainders are written
decimal to binary is by in reverse order to get
dividing the given the binary value of the
decimal number given decimal number.
recursively by 2.
15
Decimal to binary conversion
16
Exercises
◉ 25
◉ 39
◉ 72
◉ 55
17
Decimal to Octal
◉ In the number system, each of the types has its own base number
i.e. octal number has a base number of 8 and the decimal
number has a base number of 10.
◉ To convert decimal to octal, we need to divide the decimal
number by the octal base number 8 and write the acquired
remainder in reverse to derive at the equivalent octal number.
18
Convert Decimal to Octal
19
Example
◉ Convert the decimal number (85)10 to an octal number.
◉ Step 1: Check if the decimal number is less than 8. If yes, the
octal number is the same. If no, then proceed forward. In this
case, 85 is more than 8 so let's go to step 2.
◉ Step 2: Divide 85 by 8 (octal base number).
◉ Note down the quotient and the remainder in the quotient-
remainder form. Repeat this process (dividing the quotient again
by 8) until we get the quotient to be less than 8.
20
Example
21
Exercises
◉ 67
◉ 99
◉ 350
22
Octal to decimal
23
24
Exercises
◉ (121)8
◉ (454)8
25
Hexadecimal Number System
26
Conversion from Hex to Decimal
27
◉ Convert (1DA6)16 to decimal.
◉ Convert (E8B)16 to decimal system.
◉ (2bf)16
28
Conversion from Decimal to Hexadecimal number
system
29
Convert 60010 into a hexadecimal number.
30
Binary to octal Conversion
31
Octal to Binary Conversion
32
Hexa Decimal to Binary Conversion
33
Binary to Hexa Decimal Number
(1000101)2
Start from the right and divide into 4 Blocks
0100 0101
34
Octal to Hexa Decimal Number
◉ Step1: Convert Octal to Binary
◉ Group 4 bits together and represent equivalent hexa
decimal digit
35
Hexa decimal to Octal conversion
36
Complements
37
Binary system Complements
38
1’s Complement
◉ To generate a 1’s complement for any given binary number,
you only need to invert that number.
◉ For a binary number like 110010, the 1’s complement would
be 001101.
39
2’s complement
◉ To generate a 2’s complement for any given binary number, you
need to invert it. Then you need to add 1 to the LSB (Least
Significant Bit) of the generated result.
◉ 1’s complement + 1
40
Positive and Negative Numbers
41
Signed Magnitude Method
◉ The sign-magnitude binary format is the simplest conceptual format. In
this method of representing signed numbers, the most significant digit
(MSD) takes on extra meaning.
◉ If the MSD is a 0, we can evaluate the number just as we would any
normal unsigned integer. And also we shall treat the number as a
positive one.
◉ If the MSD is a 1, this indicates that the number is negative.
42
Signed Magnitude 1’s Complement
43
2’s complement Method
◉ +5 is represented as it is represented in sign magnitude method. -
5 is represented using the following steps:
◉ (i) +5 = 0 0101
◉ (ii) Take 2’s complement of 0 0101 and that is 1 1011. MSB is 1
which indicates that number is negative.
◉ MSB is always 1 in case of negative numbers.
44
Binary Arithmetic
45
Binary Addition
46
Addition using 2’s complement
47
◉ Case 2: Larger of 2 numbers are positive
Example: 1101 and -1001
◉ First, find the 2's complement of the negative number 1001. So, for finding 2's
complement, change all 0 to 1 and all 1 to 0 or find the 1's complement of the
number 1001. The 1's complement of the number 1001 is 0110, and add 1 to
the LSB of the result 0110. So the 2's complement of number 1001 is
0110+1=0111
◉ Add both the numbers, i.e., 1101 and 0111;
1101+0111=1 0100
◉ By adding both numbers, we get the end-around carry 1. We discard the end-
around carry. So, the addition of both numbers is 0100.
48
Case 3: The larger of 2 numbers are negative
Example: 1101 and -1110
◉ First, find the 2's complement of the negative number 1110. So, for finding
2's complement, add 1 to the LSB of its 1's complement value 0001.
0001+1=0010
◉ Add both the numbers, i.e., 1101 and 0010;
1101+0010= 1111
◉ Find the 2's complement of the result 1110 that is the final result. So, the
2's complement of the result 1110 is 0001, and add a negative sign before
the number so that we can identify that it is a negative number.
49
Case 4: Both the numbers are negative
Example: -1101 and -1110 in five-bit register
◉ Firstly find the 2's complement of the negative numbers 01101 and 01110.
So, for finding 2's complement, we add 1 to the LSB of the 1's
complement of these numbers. 2's complement of the number 01110 is
10010, and 01101 is 10011.
◉ We add both the complement numbers, i.e., 10001 and 10010;
10010+10011= 1 00101
◉ By adding both numbers, we get the end-around carry 1. This carry is
discarded and the final result is the 2.s complement of the result 00101.
So, the 2's complement of the result 00101 is 11011, and we add a
negative sign before the number so that we can identify that it is a
negative number.
50
Binary Subtraction
51
Case i) Binary subtraction without borrowing
Case ii) Binary subtraction with borrowing
Case iii)Binary Subtraction Using 1's Complement
52
Case ii) Binary subtraction with borrowing:
53
Case iii)Binary Subtraction Using 1's Complement
54
Binary Subtraction Using 2's Complement
55
Binary Multiplication
56
Binary Division
57
Codes in Digital Electronics
59
Example
60
Excess-3 Code
61
62
Gray Code
63
How to generate Gray code?
64
65
Binary code to Gray code
66
Conversion from Gray code to Binary Code
67
Alphanumeric Code
68
ASCII Code
◉ The full form of ASCII code is the American Standard Code for
Information Interchange.
◉ It is a seven-bit code based on the English alphabet
◉ it can almost represent 128 characters. These include 95
printable characters including 26 upper-case letters (A to Z), 26
lowercase letters (a to z), 10 numerals (0 to 9) and 33 special
characters such as mathematical symbols, space character etc.
69
EBCDIC(Extended Binary Coded Decimal
Interchange Code)
70
Difference Between ASCII and EBCDIC
71
Fixed Point Representation
72
◉ Sign bit:- The fixed-point number representation in binary uses a sign bit.
The negative number has a sign bit 1, while a positive number has a bit 0.
◉ Integral Part:- The integral part in fixed-point numbers is of different
lengths at different places. It depends on the register's size; for an 8-bit
register, the integral part is 4 bits.
◉ Fractional part:- The Fractional part is of different lengths at different
places. It depends on the registers; for an 8-bit register, the fractional part
is 3 bits.
73
How to write numbers in Fixed-point
notation
74
Chapter 2
Structure Of Computers
75
Digital Computers
76
A computer system is subdivided into two functional entities: Hardware and
Software.
Hard ware
Software
◉ The hardware consists of all the electronic components and
electromechanical devices that comprise the physical entity of the
device.
◉ The software of the computer consists of the instructions and data that
the computer manipulates to perform various data-processing tasks.
77
Software is a set of instructions, data or programs used to operate
computers and execute specific tasks.
The two main categories of software are
application software
system software.
Application software. The most common type of software,
application software is a computer software package that performs a
specific function for a user, or in some cases, for another application.
office suites, graphics software, databases and database management
programs, web browsers, word processors, software development
tools, image editors and communication platforms.
78
◉ System software. These software programs are designed to run a
computer's application programs and hardware.
◉ System software coordinates the activities and functions of the hardware
and software.
◉ In addition, it controls the operations of the computer hardware and
provides an environment or platform for all the other types of software to
work in. The OS is the best example of system software;
79
◉ Computer organization is concerned with the way the hardware
components operate and the way they are connected together to form the
computer system.
◉ Computer design is concerned with the hardware design of the computer.
Once the computer specifications are formulated, it is the task of the
designer to develop hardware for the system.
◉ Computer architecture is concerned with the structure and behaviour of
the computer as seen by the user. It includes the information formats, the
instruction n set, and techniques for addressing memory.
80
Computer Types
81
Functional Unit of a computer
82
Input unit:
◉ Input units are used by the computer to read the data. The most commonly
used input devices are keyboards, mouse, joysticks, trackballs,
microphones, etc.
◉ However, the most well-known input device is a keyboard. Whenever a key
is pressed, the corresponding letter or digit is automatically translated into
its corresponding binary code and transmitted over a cable to either the
memory or the processor.
Central processing unit:
◉ Central processing unit commonly known as CPU can be referred as an
electronic circuitry within a computer that carries out the instructions given
by a computer program by performing the basic arithmetic, logical, control
and input/output (I/O) operations specified by the instructions.
83
Memory unit:
◉ The Memory unit can be referred to as the storage area in which programs are kept which are
running, and that contains data needed by the running programs.
◉ The Memory unit can be categorized in two ways namely, primary memory and secondary
memory.
◉ Primary storage is the fastest memory that operates at electronic speeds. Primary memory
contains a large number of semiconductor storage cells, capable of storing a bit of
information. The word length of a computer is between 16-64 bits.
◉ It is also known as the volatile form of memory, means when the computer is shut down,
anything contained in RAM is lost.
◉ The most common examples of primary memory are RAM and ROM.
◉ Secondary memory is used when a large amount of data and programs have to be stored for
a long-term basis.
◉ It is also known as the Non-volatile memory form of memory, means the data is stored
permanently irrespective of shut down.
◉ The most common examples of secondary memory are magnetic disks, magnetic tapes, and
optical disks. 84
Arithmetic & logical unit:
◉ Most of all the arithmetic and logical operations of a computer are executed in the ALU
(Arithmetic and Logical Unit) of the processor. It performs arithmetic operations like addition,
subtraction, multiplication, division and also the logical operations like AND, OR, NOT
operations.
Control unit:
◉ The control unit is a component of a computer's central processing unit that coordinates the
operation of the processor. It tells the computer's memory, arithmetic/logic unit and input and
output devices how to respond to a program's instructions.
◉ The control unit is also known as the nerve center of a computer system.
Output Unit:
◉ The primary function of the output unit is to send the processed results to the user. Output
devices display information in a way that the user can understand.
◉ Output devices are pieces of equipment that are used to generate information or any other
response processed by the computer. These devices display information that has been held or
generated within a computer.
85
Von Neumann Architecture
86
Components of Von-Neumann Model:
87
88
89
Bus Structure
90
Performance
91
Flow of program instruction and data between
memory & processor:
92
Processor clock:
◉ Clock speed, also known as clock rate or clock frequency, is a measure of
how fast a computer’s central processing unit (CPU) can execute
instructions.
◉ It is typically measured in gigahertz (GHz).
◉ Higher clock speeds generally mean that a CPU can process more
instructions per second, and thus can perform better on tasks that require
fast processing.
◉ Processor circuits are controlled by timing signal called clock
◉ The clock defines regular time intervals called clock cycles
93
Basic Performance Equation
CPU performance equation.
The Classic CPU Performance Equation in terms of instruction count (the number of instructions executed by the program), CPI, and clock
cycle time:
CPU time=Instruction count * CPI * Clock cycle time or
since the clock rate is the inverse of clock cycle time:
CPU time = Instruction count *CPI / Clock rate
T = N X S / R where N is Actual Number of Instructions, S is Average number of basic steps needed in one machine cycle
And R is Clock rate in cycles per speed
Relative performance:
Performance A / Performance B = Execution time B / Execution time A = n
CPU execution time for a program
CPU execution time for a program =CPU clock cycles for a program * clock cycle time or since the clock rate is the inverse of clock cycle
time:
CPU execution time for a program= CPU clock cycles for a program / Clock rate
CPU clock cycles required for a program
CPU clock cycles = Instructions for a program * Average clock cycles per instruction
94
Clock Rate
◉ CLOCK RATE: There are two possibilities for increasing the clock rate, R.
◉ First Improving the integrated circuit (IC) technology makes logic circuits
faster, which reduces the time needed to complete a basic step. This
allows the clock period, P, to be reduced and the clock rate, R, to be
increased.
◉ Second, reducing the amount of processing done in one basic step also
makes it possible to reduce the clock period, P.
However, if the actions that have to be performed by an instruction
remain the same, the number of basic steps needed may increase.
95
Multi processor
◉ A Multiprocessor is a computer system with two or more central
processing units (CPUs) share full access to a common RAM.
◉ The main objective of using a multiprocessor is to boost the system’s
execution speed, with other objectives being fault tolerance and
application matching.
◉ There are two types of multiprocessors,
one is called shared memory multiprocessor and
another is distributed memory multiprocessor.
◉ In shared memory multiprocessors,
all the CPUs shares the common memory but in a distributed memory
multiprocessor, every CPU has its own private memory.
96
Multi Computer
97
◉ As the multicomputer is capable of messages passing between the
processors, it is possible to divide the task between the processors to
complete the task.
◉ Hence, a multicomputer can be used for distributed computing.
◉ It is cost effective and easier to build a multicomputer than a
multiprocessor.
98
Difference between Multi processor and Multi
computer
Multiprocessor Multicomputer
Multiprocessor is a system with two or multicomputer is a system with
more central processing units (CPUs) multiple processors that are attached
that is capable of performing multiple via an interconnection network to
tasks perform a computation task..
A multiprocessor system is a single multicomputer system is a cluster of
computer that operates with multiple computers that operate as a singular
CPUs computer.
Construction of multiprocessor is not Construction of multicomputer is
easier and cost effective easier and cost effective .
99
Unit-1
Chapter – 3
Digital Logic Circuits
100
Introduction
◉ The basic digital electronic circuit that has one or more inputs and single
output is known as Logic gate.
◉ Digital electronic circuits operate with voltages of two logic levels namely
Logic Low and Logic High.
◉ The range of voltages corresponding to Logic Low is represented with ‘0’.
◉ Similarly, the range of voltages corresponding to Logic High is represented
with ‘1’.
101
Digital Logic
102
Types of Gates
103
AND Gate
◉ The AND gate produces the AND logic function: that is, the output is 1
if input A and input B are both equal to 1; otherwise, the output is 0.
◉ An AND gate is a digital circuit that has two or more inputs and
produces an output, which is the logical AND of all those inputs. It is
optional to represent the Logical AND with the symbol ‘.’.
A B Y = A.B
0 0 0
0 1 0
1 0 0
1 1 1
104
OR Gate
◉ An OR gate is a digital circuit that has two or more inputs and produces
an output, which is the logical OR of all those inputs.
◉ This logical OR is represented with the symbol ‘+’.
◉ Here A, B are the inputs and Y is the output of two input OR gate. If both
inputs are ‘0’, then only the output, Y is ‘0’. For remaining combinations
of inputs, the output, Y is ‘1’.
A B Y=A+B
0 0 0
0 1 1
1 0 1
1 1 1
105
NOT Gate
◉ A NOT gate is a digital circuit that has single input and single output. The output of NOT
gate is the logical inversion of input.
◉ Hence, the NOT gate is also called as inverter.
◉ Here A and Y are the input and output of NOT gate respectively. If the input, A is ‘0’, then the
output, Y is ‘1’.
◉ Similarly, if the input, A is ‘1’, then the output, Y is ‘0’.
A Y = A’
0 1
1 0
106
NAND Gate
◉ The NAND function is the complement of the AND function
◉ The designation NAND is derived from the abbreviation of NOT-AND
A B Y = (A.B)’
0 0 1
0 1 1
1 0 1
1 1 0
107
NOR gate
◉ NOR gate is a digital circuit that has two or more inputs and produces an output,
which is the inversion of logical OR of all those inputs.
◉ Here A, B are the inputs and Y is the output. If both inputs are ‘0’, then the output, Y
is ‘1’.
◉ If at least one of the input is ‘1’, then the output, Y is ‘0’. This is just opposite to that
of two input OR gate operation.
A B Y = (A+B)’
0 0 1
0 1 0
1 0 0
1 1 0
108
Exclusive AND Gate
◉ The exclusive-OR gate has a graphic symbol similar to the OR gate except
for the additional curved line on the input side.
109
Exclusive NOR Gate
110
Universal Gates
111
NAND Gate is a Universal Gate
112
NAND Gate as AND Gate
The AND gate can be implemented by using two NAND gates in the below fashion:
113
NAND as NOT
◉ A NOT gate is made by joining the inputs of a NAND gate together.
◉ Since a NAND gate is equivalent to an AND gate followed by a NOT gate,
joining the inputs of a NAND gate leaves only the NOT gate.
114
NAND Gate as OR Gate
◉ If the truth table for a NAND gate is examined, it can be seen that if any of
the inputs are 0, then the output will be 1.
◉ To be an OR gate, however,
the output must be 1 if any input is 1.
◉ Therefore, if the inputs are inverted,
any high input will trigger a high output.
115
NAND as NOR Gate
116
NAND as NOR Gate
◉ An XOR gate is made by connecting four NAND gates as shown below. This
construction entails a propagation delay three times that of a single NAND
gate.
117
NAND gate as XOR gate
118
NAND Gate as X-NOR gate
◉ NAND gate is an inverted-input OR gate.
◉ This construction entails a propagation delay three times that of a single
NAND gate and uses five gates.
119
Boolean Algebra
◉ Boolean Algebra is used to analyse and simplify the digital (logic) circuits.
◉ It uses only the binary numbers i.e. 0 and 1. It is also called as Binary
Algebra or logical Algebra.
◉ Boolean algebra was invented by George Boole in 1854.
◉ There is no negative and fractional numbers
◉ Boolean algebra uses Boolean Variables and Boolean operators.
◉ There are 3 Basic operators AND,OR,NOT.
◉ A Boolean Expression is combination of Boolean Variables and Boolean
Operators.
◉ A Boolean Function has one or more input variables and Produces the result
based on the input.
120
Truth Table:
◉ Boolean function can be uniquely and completely described by truth table.
◉ A truth table lists all possible values of input combinations of the function and
produces the output for all combinations.
Rule in Boolean Algebra:
◉ Variable used can have only two values. Binary 1 for HIGH and Binary 0 for LOW.
◉ Complement of a variable is represented by an over bar (-). Thus, complement of
variable B is represented as . Thus if B = 0 then = 1 and B = 1 then = 0.
◉ OR ing of the variables is represented by a plus (+) sign between them. For example
OR ing of A, B, C is represented as A + B + C.
◉ Logical AND ing of the two or more variable is represented by writing a dot between
them such as A.B.C. Sometime the dot may be omitted like ABC.
121
Boolean Laws
122
◉ Commutative law:
Any binary operation which satisfies the following expression is
referred to as commutative operation.
123
◉ Distributive law:
Distributive law states the following condition.
◉ AND law:
These laws use the AND operation. Therefore they are called as AND laws.
◉ OR law
These laws use the OR operation. Therefore they are called as OR laws.
◉ INVERSION law:
This law uses the NOT operation. The inversion law states that double inversion of
a variable results in the original variable itself.
124
Duality Principle:
◉ According to the duality principle, if we have theorems of Boolean Algebra
for any one type of operation then the operation can be converted into
another type of operation.
◉ In other words AND can be converted to OR and OR can be converted into
AND
◉ We can interchange '0 with 1', '1 with 0', '(+) sign with (.) sign' and '(.) sign
with (+) sign' to perform dual operation. T
125
De Morgan's Theorem
◉ This theorem explains that the complements of the products of all the
terms are equal to the sums of the complements of each and every term
◉ Likewise, the complements of the sums of all the terms are equal to the
products of the complements of each and every term.
◉ There are 2 theorems in DeMorgan’s
1. Theorem 1:
2. Theorem 2:
126
◉ Theorem 1: This theorem explains that the complements of the products of
all the terms are equal to the sums of the complements of each and every
term
◉ The LHS (left-hand side) of this theorem represents the NAND gate that has inputs A and B. On
the other hand, the RHS (right-hand side) of this theorem represents the OR gate that has
inverted inputs.
◉ The OR gate here is known as a Bubbled OR.
127
128
◉ Theorem 2: The complements of the sums of all the terms are equal to the
products of the complements of each and every term.
◉ The left-hand side of this theorem represents the NOR gate that has inputs A
and B. On the other hand, the right-hand side represents the AND gate that
has inverted inputs.
◉ The AND gate here is known as a Bubbled AND.
129
130
131
For applying the De Morgan's theorem on this expression, we have to follow the following expressions:
1) In complete expression, first, we find those terms on which we can apply the De Morgan's theorem
and treat each term as a single variable.
132
Standard Form of Boolean Expressions
133
Min Term
◉ Min term means the term that is true for a minimum number of combination of inputs. That is
true for only one combination of inputs.
◉ Since AND gate also gives True only when all of its inputs are true so we can say min terms are
AND of input combinations like in the table given below.
134
SOP Sum of Product
135
◉ Canonical SOP Form: This is the standard form of Sum of Product.
◉ Canonical SOP expression is represented by summation sign ∑ and min
terms in the braces for which For this function the canonical SOP
expression is
● F = ∑( m1, m2, m3, m5 )
● Which means that the function is true for the min
terms {1, 2, 3, 5} the output is true.
● By expanding the summation we get.
● F = m1 + m2 + m3 + m5
● Now putting min terms in the expression
● F = A̅B̅C + A̅BC̅ + A̅BC + AB̅C
● Canonical form contains all inputs either
complemented or non-complemented in its product
terms.
136
◉ Non-Canonical SOP Form: As the name suggests, this form is the non-
standardized form of SOP expressions. The product terms are not the min
terms but they are simplified.
137
◉ Minimal SOP Form: Minimal SOP form can be made using Boolean
algebraic theorems but it is very easily made using Karnaugh map (K-map).
Minimal SOP form is preferred because it uses the minimum number
of gates and input lines. it is commercially beneficial because of its compact
size, fast speed, and low fabrication cost.
138
Product of Sums
◉ When two or more sum terms are multiplied the resultant expression if
product of sums.
◉ Canonical form of Boolean Expression
139
◉ A Min term is product of N distinct literals where each literal occurs exactly
once
◉ A Max term is sum of N distinct literals where each literal occurs exactly
once
◉ A Boolean function can be expressed as sum of min terms(SOP)
◉ A Boolean function can be expressed as product of max terms(POS)
140
141
142
Map Simplification
143
2 Variable K-map
• In the above figure, there is only one possibility of grouping four adjacent minterms.
• The possible combinations of grouping 2 adjacent minterms are {(m0, m1), (m2, m3), (m0,
m2) and (m1, m3)}.
144
145
146
147
148
3-variable K-map
149
The 4-Variable Karnaugh Map
150
Combinational Circuits
151
◉ Combinational Circuits are made from 3 Basic Gates; NAND, NOR, NOT that
re combined and connected together to produce more complicated
switching circuits.
◉ These gates are building blocks of Combinational logic circuits.
◉ There are 3 main ways to specify the function of combinational circuits
1. Boolean Algebra
2. Truth Table
3. Logic Diagram
152
Classification of Combinational Circuits:
◉ There are three main categories of combinational circuits: arithmetic or
logical functions, data transmission and code converter as given below in
category diagram.
153
Half Adder
◉ Half adder is a combinational logic circuit with two inputs and two outputs.
◉ The half adder circuit is designed to add two single bit binary number A and B. It is the basic
building block for addition of two single bit numbers.
◉ It doesn’t take carry from previous sum
◉ This circuit has two outputs carry and sum.
◉ The Boolean Expression for Half adder is:
Sum = A‘B+AB'
Carry = A.B
Block diagram
Circuit Diagram
Truth Table
154
Full Adder
155
• The above block diagram describes the construction of the Full adder circuit. In the above
circuit, there are two half adder circuits that are combined using the OR gate.
• The first half adder has two single-bit binary inputs A and B.
• As we know that, the half adder produces two outputs, i.e., Sum and Carry.
• The 'Sum' output of the first adder will be the first input of the second half adder, and the 'Carry' output
of the first adder will be the second input of the second half adder.
• The second half adder will again provide 'Sum' and 'Carry'. The final outcome of the Full adder circuit
is the 'Sum' bit.
• In order to find the final output of the 'Carry', we provide the 'Carry' output of the first and the second
adder into the OR gate. The outcome of the OR gate will be the final carry out of the full adder circuit.
156
The full adder circuit construction can also be represented in a Boolean
expression.
Sum:
◉ Perform the XOR operation of input A and B.
◉ Perform the XOR operation of the outcome with carry. So, the sum is (A XOR
B) XOR Cin which is also represented as:
(A ⊕ B) ⊕ Cin
Carry:
◉ Perform the 'AND' operation of input A and B.
◉ Perform the 'XOR' operation of input A and B.
◉ Perform the 'OR' operations of both the outputs that come from the previous
two steps. So the 'Carry' can be represented as:
A.B + (A ⊕ B)
157
Flip Flops
◉ The storage elements employed in clocked sequential circuits are called Flip-
Flops.
◉ A Flip flop is capable of storing one bit of information.
◉ It has 1 inputs and 2 outputs.
◉ One output is for normal value and another output is for complement value of a
bit stored to it.
Types of flip-flops:
◉ SR Flip Flop
◉ JK Flip Flop
◉ D Flip Flop
◉ T Flip Flop
158
SR Flip Flop
159
S.N. Condition Operation
1 S = R = 0 : No If S = R = 0 then output of NAND gates 3 and 4 are forced to become
change 1.
Hence R' and S' both will be equal to 1. Since S' and R' are the input
of the basic S-R latch using NAND gates, there will be no change in
the state of outputs.
160
D (Data or Delay) Flip-Flop
161
S. Condition Operation
N.
162
JK((Jack Kilby) Flip Flops
◉ The JK flip flop is used to remove the drawback of the S-R flip flop i.e.,
undefined states. .
◉ The JK flip flop is formed by doing modification in the SR flip flop
◉ When S and R input is set to true, the SR flip flop gives an inaccurate result. But in
the case of JK flip flop, it gives the correct output.
163
T (Toggling) Flip-Flop
164
S.N. Condition Operation
1 T = 0, J = K = The output Q and Q bar won't change
0
2 T = 1, J = K = Output will toggle corresponding to every leading edge of
1 clock signal.
165
166
Master Slave JK flip flop
167
168
Sequential Circuits
169
◉ Sequential circuits are digital circuits that store and use the previous state
information to determine their next state.
◉ Unlike combinational circuits, which only depend on the current input values to
produce outputs,
◉ sequential circuits depend on both the current inputs and the previous state stored in
memory elements.
◉ A Sequential circuit is specified by
1. A time sequence of external inputs
2. External outputs
3. Internal flip flop binary states
170
State table of Sequential Circuit:
◉ The behaviour of sequential circuit is determined from the inputs, the
outputs and the state of its flip flops
◉ A sequential circuit is specified by a state table that relates outputs and
next states s function of inputs and present states.
171
State Diagram:
◉ The information in a state table can be graphically represented in a state
diagram.
◉ In this type of diagram, a state represented by a circle, and the transition
between states indicated by directed lines connecting the circles.
◉ The state diagram of the sequential circuit given below.
172
◉ The directed line from state 00 to 01 labelled 1/0.
◉ It means that when the sequential circuit is in the present state 00 and the input is 1, the
output is 0.
◉ After a clock transition, the circuit goes to the next state 01.
◉ The same clock transition may change the input value.
◉ If the input changes to 0, the output becomes 1.
◉ But if the input remains at 1, the output stays at 0.
◉ This information obtained from the state diagram along the two directed lines from the circle
representing state 01.
173
Design of sequential circuit:
1. Translate the circuit specification into state diagram
2. Convert state diagram into state table
3. From state table derive the equations and draw the logic circuit
diagrams.
174
Shift Registers
◉ The shift registers are another type of sequential logic circuits that is used for storage and
transfer.
◉ The information stored within these registers can be transferred with the help of shift
registers.
◉ Shift Register is a group of flip flops used to store multiple bits of data.
◉ The bits stored in such registers can be made to move within the registers and in/out of the
registers by applying clock pulses.
◉ An n-bit shift register can be formed by connecting n flip-flops where each flip-flop stores a
single bit of data.
◉ The registers which will shift the bits to the left are called “Shift left registers”.
◉ The registers which will shift the bits to the right are called “Shift right registers”.
175
Types of Shift Registers
◉ Serial In Serial Out shift register
◉ Serial In parallel Out shift register
◉ Parallel In Serial Out shift register
◉ Parallel In parallel Out shift register
176
Serial In Serial Out shift register:
◉ The shift register, which allows serial input (one bit after the other through
a single data line) and produces a serial output is known as a Serial-In
Serial-Out shift register.
◉ Since there is only one output, the data leaves the shift register one bit at a
time in a serial pattern, thus the name Serial-In Serial-Out Shift Register.
177
Serial-In Parallel-Out Shift Register (SIPO):
◉ The shift register, which allows serial input (one bit after the other through a single data line)
and produces a parallel output is known as the Serial-In Parallel-Out shift register.
◉ The logic circuit given below shows a serial-in-parallel-out shift register.
◉ The circuit consists of four D flip-flops which are connected.
◉ The clear (CLR) signal is connected in addition to the clock signal to all 4 flip flops in order to
RESET them.
◉ The output of the first flip-flop is connected to the input of the next flip flop and so on.
178
Parallel-In Serial-Out Shift Register (PISO):
◉ The shift register, which allows parallel input (data is given separately to each flip flop and in a
simultaneous manner) and produces a serial output is known as a Parallel-In Serial-Out shift
register.
◉ The logic circuit given below shows a
parallel-in-serial-out shift register.
◉ The circuit consists of four D flip-flops
which are connected.
◉ The output of the previous flip-flop
and parallel data input are connected
to the input of the MUX and
the output of MUX is connected to the
next flip-flop.
179
Parallel-In Parallel-Out Shift Register (PIPO):
◉ The shift register, which allows parallel input (data is given separately to
each flip flop and in a simultaneous manner) and also produces a parallel
output is known as Parallel-In parallel-Out shift register.
◉ The logic circuit given below shows a parallel-in-parallel-out shift register.
180
Bidirectional Shift Register:
◉ Bidirectional shift registers are the registers that are capable of shifting the data either right or
left depending on the mode selected.
◉ If the mode selected is 1(high), the data will be shifted toward the right direction and if the
mode selected is 0(low), the data will be shifted towards the left direction. The logic circuit
given below shows a Bidirectional shift register.
181
Counters
182
Binary Counter:
A counter that pursues the binary number sequence is known as a binary counter. An n-bit binary
counter is a register of n flip-flops and related gates that follows a sequence of states as per the
binary count of n bits, from 0 to 2n – 1.
◉ A sequence of binary numbers including 0000, 0001, 0010, 0011, etc.
◉ The lower-order bit is achieved after each count and each other bit is achieved from one count
to the next if and only if all its lower-order bits are similar to 1.
For example, the binary count from 0111 (7) to 1000 (8) is appeared by
(a) complementing the low-order bit,
(b) complementing the second-order bit because the first bit of 0111 is 1,
(c) complementing the third-order bit because the first two bits of 01 11 are 1's, and
(d) complementing the fourth-order bit because the first three bits of 0111 are all 1's.
183
◉ The first stage A0 is complemented when the
counter is allowed and the clock goes through
a positive transition.
◉ Each of the other three flip-flops is
complemented when all preceding smallest
significant flip-flops are similar to 1 and the
count is allowed.
◉ The chain of AND gates creates the needed
logic for the J and K inputs.
◉ The output carry can be used to develop the
counter to further procedures, with each
procedure having an extra flip-flop and an AND
gate.
184
Integrated Circuit
185
Diode Logic (DL)
◉ Registers and diodes are used to implement logic. The purpose of diode is to
perform OR and AND operation, and logic switch. It is essential that diode is
forward biased so that it can conduct.
◉ Disadvantages: diodes can not perform NOT operation, diode cannot work
for multiple states, only one stage at a time, tend to degrade signals quickly.
Resistor-Transistor Logic (RTL)
◉ Registers and transistors are used to implement logic. Transistors are used to
combine signals which are inverted and amplified inputs. These are
economical and easy to design but slower in speed. These require great
amount of current from supply. RTL gates can be used as interface between
linear circuits and digital.
186
Diode Transistor Logic (DTL)
◉ Registers and diodes are used to implement logic.
◉ It has advantages over DL and RTL.
◉ Diode can perform AND and OR operation along with a transistor and output
signal can be amplified.
◉ It has logic inversion which is signal can be restored to full logic level, if we
add a transistor at output of logic gates.
◉ OR operation can be performed using diodes instead of resistors which
removes interaction between input signals.
◉ Since input resistor to transistor, switching speed of transistor is limited. DTL
was used in tube computers.
187
Transistor - Transistor Logic (TTL)
◉ Transistors are used to implement logic and Bipolar transistors to contract
integrated circuits. There are standard TTL, high speed TTL, low power TTL,
and schottky TTL. It is popular logic family.
Emitter Coupled Logic (ECL)
◉ ECL is a non-structured logic. Advantages of this logic are speed, and very
low propagation delay.
Complementary Metal Oxide Semiconductor Logic (CMOS)
◉ It is known for high fan-out, low power consumption and most reliable logic
family.
◉ CMOS technology is used in micro processors, micro controllers, static RAM
and other digital logic circuits.
188
Multiplexers
189
There are various types of Multiplexers:
◉ 2 X 1 Multiplexer
◉ 4 X 1 Multiplexer
◉ 8 X 1 Multiplexer
◉ 16 X 1 Multiplexer
190
4×1 Multiplexer
◉ In the 4×1 multiplexer, there is a total of
four inputs, i.e., A0, A1, A2, and A3, 2 selection lines, i.e., S0 and S1 and
single output, i.e., Y.
◉ On the basis of the combination of inputs that are present at the selection lines
S0 and S1, one of these 4 inputs are connected to the output.
191
◉ The logical expression of the term Y is as follows:
Y=S1' S0' A0+S1' S0 A1+S1 S0' A2+S1 S0 A3
192
8 to 1 Multiplexer
◉ In the 8 to 1 multiplexer, there are total eight inputs, i.e., A 0, A1, A2, A3, A4, A5, A6, and A7, 3
selection lines, i.e., S0, S1and S2 and single output, i.e. Y
Y=S0'.S1'.S2'.A0+S0.S1'.S2'.A1+S0'.S1.S2'.A2+S0.S1.S2'.A3+S0'.S1'.S2 A4+S0.S1'.S2.A5+S0'.S1.S2.A6+S0.S1.S3.A7
193
194
2 X 1 Multiplexer
195
Demultiplexers
◉ De-Multiplexer is a combinational circuit that performs the reverse
operation of Multiplexer.
◉ It has single input, ‘n’ selection lines and maximum of 2n outputs.
◉ The input will be connected to one of these outputs based on the values of
selection lines.
◉ Since there are ‘n’ selection lines, there will be 2n possible combinations of
zeros and ones.
◉ So, each combination can select only one
output.
De-Multiplexer is also called as De-Mux.
196
1×2 De-multiplexer
◉ In the 1 to 2 De-multiplexer, there are only two outputs, i.e., Y0, and Y1, 1
selection lines, i.e., S0, and single input, i.e., A. On the basis of the
selection value, the input will be connected to one of the outputs. The
block diagram and the truth table of the 1×2 multiplexer are given below.
197
198
1×4 De-multiplexer
◉ In 1 to 4 De-multiplexer, there are total of four outputs, i.e., Y0, Y1, Y2,
and Y3, 2 selection lines, i.e., S0 and S1 and single input, i.e., A. On the
basis of the combination of inputs which are present at the selection
lines S0 and S1, the input be connected to one of the outputs.
199
200
Decoders
201
◉ The following image shows a 3-to-8 line decoder
202
◉ Let us consider an example of 2-to-4 line NAND Gate Decoder which uses
NAND Gates instead of AND gate in the central logic.
203
Decoder Expansion
204
Encoders
205
◉ The most common application of an encoder is the Octal-to-
Binary encoder. Octal to binary encoder takes eight input lines and
generates three output lines.
206
207
Chapter 4
Computer Arithmetic
208
Introduction
◉ Data is manipulated by using the arithmetic instructions in digital computers.
◉ The Addition, subtraction, multiplication and division are the four basic arithmetic
operations
◉ The arithmetic instructions are performed generally on binary or decimal data.
◉ Fixed-point numbers are used to represent integers or fractions. We can have
signed or unsigned negative numbers
◉ A processor has an arithmetic processor(as a sub part of it) that executes arithmetic
operations.
◉ The data type, assumed to reside in processor, registers during the execution of an
arithmetic instruction.
◉ Negative numbers may be in a signed magnitude or signed complement
representation.
◉ There are three ways of representing negative fixed point - binary numbers signed
magnitude, signed 1’s complement or signed 2’s complement.
209
Addition and Subtraction
210
magnitude representation
◉ We designate the magnitude of the two numbers by A and B
◉ Where the signed numbers are added or subtracted, we find that there are eight
different conditions to consider, depending on the sign of the numbers and the
operation performed.
211
The two signs A, and B, are
compared by an exclusive-OR
gate. If the output of the gate
is 0 the signs are identical; If it
is 1, the signs are different.
212
Multiplication Algorithm
213
Booth’s algorithm
◉ Booth algorithm gives a procedure for multiplying binary integers in signed- 2’s
complement representation.
◉ It operates on the fact that strings of 0’s in the multiplier require no addition but just
shifting, and a string of 1’s in the multiplier from bit weight 2k to weight 2m can be
treated as 2k+1 – 2 m.
◉ For example, the binary number 001110 (+14) has a string 1’s from 23 to 21 (k=3,
m=1).
◉ The number can be represented as 2k+1 – 2 m. = 24 – 2 1 = 16 – 2 = 14. Therefore, the
multiplication M X 14, where M is the multiplicand and 14 the multiplier, can be done
as M X 24 – M X 21 .
◉ Thus the product can be obtained by shifting the binary multiplicand M four times to
the left and subtracting M shifted left once.
214
215
216
217
218
Division Algorithms
219
220
Floating point arithmetic
221
Floating point arithmetic operations
222
Numbers
223
224
Floating point Multiplication
225
Floating point Multiplication
◉ The multiplication of two floating-point numbers requires
that we multiply the mantissas and add the exponents.
◉ No comparison of exponents or alignment of mantissas
is necessary. The multiplication of the mantissas
is performed in the same way as in fixed-point to provide
a double-precision product.
◉ The multiplication algorithm can be subdivided
into four parts:
1. Check for zeros.
2. Add the exponents.
3. Multiply the mantissas.
4. Normalize the product.
226
Floating point Division
227
Floating point division
◉ Floating-point division requires that the exponents be subtracted and the mantissas
divided.
◉ The mantissa division is done as in fixed-point except that the dividend has a single-
precision mantissa that is placed in the AC.
◉ Remember that the mantissa dividend is a fraction and not an integer.
◉ For integer representation, a single-precision dividend must be placed in register Q
and register A must be cleared.
◉ The division algorithm can be subdivided into five parts:
1. Check for zeros.
2. Initialize registers and evaluate the sign.
3. Align the dividend.
4. Subtract the exponents.
5. Divide the mantissas.
228
Decimal Arithmetic Unit
229
230
BCD Multiplication
231
Decimal Division
232
AND TABLES TO COMPARE DATA
A B C
Yellow 10 20 7
Blue 30 15 10
Orange 5 24 16
233
MAPS
our office
234
89,526,12
4
Whoa! That’s a big number, aren’t you proud?
235
89,526,124$
That’s a lot of money
185,244 users
And a lot of users
100%
Total success!
236
OUR PROCESS IS EASY
237
LET’S REVIEW SOME CONCEPTS
238
4000
3000
2000
1000
239
MOBILE PROJECT
Show and explain your web,
app or software projects using
these gadget templates.
240
TABLET PROJECT
Show and explain your web,
app or software projects using
these gadget templates.
241
DESKTOP PROJECT
Show and explain your web,
app or software projects using
these gadget templates.
242
THANKS
!
Any questions?
You can find me at
@username / [email protected]
243
CREDITS
244
PRESENTATION DESIGN
This presentation uses the following typographies:
◉ Titles: Oswald
◉ Body copy: Source Sans Pro
Download for free at:
https://www.fontsquirrel.com/fonts/oswald
https://www.fontsquirrel.com/fonts/source-sans-pro
You don’t need to keep this slide in your presentation. It’s only here to serve you as a design guide if you
need to create new slides or download the fonts to edit the presentation in PowerPoint®
245
EXTRA RESOURCES
For Business Plans, Marketing Plans, Project
Proposals, Lessons, etc
2
TIMELINE
Blue is the colour of the Red is the colour of Black is the color of ebony Yellow is the color of gold, White is the color of milk Blue is the colour of the
clear sky and the deep sea danger and courage and of outer space butter and ripe lemons and fresh snow clear sky and the deep sea
JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC
Yellow is the color of gold, White is the color of milk Blue is the colour of the Red is the colour of Black is the color of ebony Yellow is the color of
butter and ripe lemons and fresh snow clear sky and the deep sea danger and courage and of outer space gold, butter and ripe
lemons
247
ROADMAP
Blue is the colour of the Red is the colour of danger Black is the color of ebony
clear sky and the deep sea and courage and of outer space
1 3 5
2 4 6
Yellow is the color of gold, White is the color of milk Blue is the colour of the
butter and ripe lemons and fresh snow clear sky and the deep sea
248
GANTT CHART
Week 1 Week 2
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Task 1
Task 2 ◆
Task 3
Task 4 ◆
Task 5 ◆
Task 6
Task 7
Task 8
249
SWOT ANALYSIS
STRENGTHS WEAKNESSES
Blue is the colour of the clear Yellow is the color of gold,
sky and the deep sea butter and ripe lemons
250
BUSINESS MODEL CANVAS
Key Partners Key Activities Value Propositions Customer Relationships Customer Segments
Insert your content Insert your content Insert your content Insert your content Insert your content
251
FUNNEL
252
TEAM PRESENTATION
253
COMPETITOR MATRIX
HIGH VALUE 2
Competitor
Compe
titor
Our company
Competitor
HIGH VALUE 1
LOW VALUE 1
Competitor
Competitor Competitor
LOW VALUE 2
254
WEEKLY PLANNER
SUNDAY MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY
12:00 - 13:15 ✔ Free time ✔ Free time ✔ Free time ✔ Free time ✔ Free time ✔ Free time ✔ Free time
255
SlidesCarnival icons are editable shapes.
Examples:
256
DIAGRAMS AND INFOGRAPHICS
257
Now you can use any emoji as an icon!
And of course it resizes without losing quality and you can change the color.
258
Free templates for all your presentation needs
For PowerPoint and 100% free for Ready to use, Blow your audience
Google Slides personal or professional and away with attractive
commercial use customizable visuals
259