0% found this document useful (1 vote)
936 views49 pages

Number System, Boolean Algebra, Logical Gates

The document discusses digital systems and binary numbers. It explains that digital computers represent information using discrete signals with two values, called binary. The core components of a digital computer are then described as the processor, storage/memory, input/output devices, and control units. Different numbering systems are covered, including binary, decimal, hexadecimal, and how to convert between them. Two's complement representation of negative numbers is explained. Boolean algebra and logic are then introduced as the foundation for digital circuits.

Uploaded by

Muhammad saqib
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
936 views49 pages

Number System, Boolean Algebra, Logical Gates

The document discusses digital systems and binary numbers. It explains that digital computers represent information using discrete signals with two values, called binary. The core components of a digital computer are then described as the processor, storage/memory, input/output devices, and control units. Different numbering systems are covered, including binary, decimal, hexadecimal, and how to convert between them. Two's complement representation of negative numbers is explained. Boolean algebra and logic are then introduced as the foundation for digital circuits.

Uploaded by

Muhammad saqib
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 49

NUMBER SYSTEM

1
2 Digital computers and Digital System

 Digital computers have made possible many scientific ,industrial


and commercial advances.

 It can follow a sequence of instructions called a program ,that


operates on a given data.

 The user can specify and change programs according to specific


need.

 Discrete elements of information are represented in a digital system


by physical quantities called signals.

 The signals in all the present day electronic digital system have
only two discrete values and are said to be BINARY.
3 Digital computers and Digital System

Processor
Control unit Or
Arithmetic unit

Storage
Or
memory unit

Input devices and Output devices


control and control

 Block Diagram of a Digital computer


4 Decimal Numbers

 A decimal number such as 7392 represents a


quantity equal to 7 thousand plus 3 hundreds plus 9
tens plus 2 units.

 7 x 103 + 3 x 102 + 9 x 101 + 2 x 100

 The decimal number system is said to be base or


radix 10 because it uses 10 digits and coefficients
are multiplied by power of 10.
5 Binary Numbers

 Binary system is a different number system


consist of two states.

For example the decimal equivalent of the binary


number 11010.11 is 26.75

1 x 24 + 1 x 23 + 0 x 22 + 1 x 21 + 0 x 20 + 1
x 2−1 + 1 x 2−2
6
Binary to decimal conversion

7 6 5 4 3 2 1 0
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1

What is 10011100 in decimal?

1 0 0 1 1 1 0 0

128 + 0 + 0 + 16 + 8 + 4 + 0 + 0 = 156
7 Hexadecimal Numbers

 The one main disadvantage of binary numbers is that


the binary string equivalent of a large decimal base-10
number can be quite long.

 One common way of overcoming this problem is to


arrange the binary numbers into groups or sets of four
bits (4-bits).

 These groups of 4-bits uses another type of numbering


system also commonly used in computer and digital
systems called Hexadecimal Numbers.
8 Hexadecimal to binary conversion
Dec Bin Hex Dec Bin Hex
0 0000 0 8 1000 8
1 0001 1 9 1001 9
2 0010 2 10 1010 a
3 0011 3 11 1011 b
4 0100 4 12 1100 c
5 0101 5 13 1101 d
6 0110 6 14 1110 e
7 0111 7 15 1111 f

2 Ac
0010 1010 1100
2ac = 001010101100
Numbers with different bases
9

Decimal Binary Hexadecimal


(Base 10) (Base 2) (Base 16)
00 0000 0
01 0001 1
02 0010 2
03 0011 3
04 0100 4
05 0101 5
06 0110 6
07 0111 7
08 1000 8
09 1001 9
10 1010 A
11 1011 B
12 1100 C
13 1101 D
14 1110 E
15 1111 F
10 Arithmetic operations in binary

Addition Subtraction
11 Two’s compliment

 But how do you represent a minus sign electronically in a

computer?

 How can you represent it such that arithmetic operations are

manageable?

 The Answer is

 Two’s compliment
12
Two’s compliment

 The method used to represent signed numbers (positive and

negative signs) in microprocessors is called Two’s complement .

 Complements are used in digital computers for simplifying the

subtraction operation and for logical manipulations.

 Two’s complement gives negative of a given number.

 Adding a number with it’s two’s complement gives all bits = 0s


13
Two’s compliment

 Can be done by adding 1 to the 1’s complement of a number.

 For 6 = 0110

 The 1’s complement is 1001 (inverting all bits)

 The 2’s complement is 1010 (add 1 to the 1’s

complement)
14 Operation with 2’s complement

Add 4 & -6
15 Operation with 2’s complement

 Add 4 and -6

 Answer = -2 (which is equal to 110 after taking 2C of 2)

 6 in binary is 110 & 2’s complement of 6 is 010

 4 in binary = 100
 4 100

 -6 010

 110 (which is equal to -2)


16 Alphanumeric Codes

 Under Digital Electronics Alphanumeric


codes are sometimes called character
codes due to their certain properties.

 These codes are basically binary codes.

 The full form of ASCII code is American


Standard Code for Information
Interchange.
17 BINARY LOGIC
 Binary Logic deals with variables that take on two discrete values
 True false ,yes or no ,on or off
18 SWITCHING CIRCUITS

∟ Let the manual switches A and B represent two binary variables with
values equal to 0 when the switch is open and 1 when the switch is
closed.
19 SWITCHING CIRCUITS

 Voltage operated circuits respond


to two separate voltage levels

 Logic 1 (2V - 5V)

 Logic 0 (0 - 0.8V)
20 INTEGRATED CIRCUIT
 An integrated circuit (IC) is a small silicon crystal called a chip, containing
electrical components such as Transistors, Diodes, Resistors & Capacitors.

 The various components are interconnected inside the chip to form an


electronic circuit.

 IC usually comes in Dual inline Package form

 Small scale integration 1-10 gates

 Medium scale integration 10-100 gates

 Large scale integration more than 100 gates

In microelectronics, a dual in-line package is an electronic component package with a rectangular


housing and two parallel rows of electrical connecting pins.
21
BOOLEAN ALGEBRA
BOOLEAN ALGEBRA
22

 1854: Logical algebra was published by George Boole  known today

as “Boolean Algebra”

 It’s a convenient way and systematic way of expressing and

analyzing the operation of logic circuits.

 1938: Claude Shannon was the first to apply Boole’s work to the

analysis and design of logic circuits.


23
Boolean Operations &
Expressions

 Variable – a symbol used to represent a logical quantity.

 Complement – the inverse of a variable and is indicated

by a bar over the variable.


24 BOOLEAN ALGEBRA

 BOOLEAN ALGEBRA is a mathematical system for the


manipulation of variables that can have one of two values.
 In formal logic, these values are “true” and “false.”
 In digital systems, these values are “on” and “off,” 1 and 0, or
“high” and “low”

 Boolean expressions are created by performing operations on Boolean


variables.
 Common Boolean operators include AND, OR, and NOT etc.
25
BOOLEAN ADDITION
 Boolean addition is equivalent to the OR
operation
0+0 = 0 0+1 = 1 1+0 = 1 1+1 = 1

 A sum term is produced by an OR operation


with no AND ops involved.
 i.e. A  B, A  B , A  B  C , A  B  C  D
 A sum term is equal to 1 when one or more of the
literals in the term are 1.
 A sum term is equal to 0 only if each of the literals
is 0.
26 BOOLEAN MULTIPLICATION
Boolean multiplication is equivalent to the
AND operation
0·0 = 0 0·1 = 0 1·0 = 0 1·1 = 1

A product term is produced by an AND


operation with no OR ops involved.
i.e. AB, AB , ABC , A BCD
A product term is equal to 1 only if each of the
literals in the term is 1.
A product term is equal to 0 when one or
more of the literals are 0.
27 LAWS & RULES OF BOOLEAN
ALGEBRA
 The basic laws of Boolean algebra:
 The Commutative laws
 The Associative laws
 The Distributive laws
28 COMMUTATIVE LAWS

 The commutative law of addition for TWO VARIABLES is written as:


A+B = B+A

A B
A+B B+A
B A

 The commutative law of multiplication for TWO VARIABLES is written


as: AB = BA

A
B
AB  B
A
B+A
29 ASSOCIATIVE LAWS

 The associative law of addition for 3 VARIABLES is written as:


A+(B+C) = (A+B)+C


A A A+B
A+(B+C)
B B
(A+B)+C
C B+C C

 The associative law of multiplication for 3 VARIABLES is written


as: A(BC) = (AB)C

A
B
A(BC)
 A
B
AB

(AB)C
C BC C
30 DISTRIBUTIVE LAWS

The distributive law is written for 3 VARIABLES


as follows: A(B+C) = AB + AC

B+C A AB
B
C B
 X
X
A A
C AC

X=A(B+C) X=AB+AC
31 RULES OF BOOLEAN ALGEBRA

1. A  0  A 7. A  A  A
2. A  1  1 8. A  A  0
3. A  0  0 9. A  A
4. A  1  A 10. A  AB  A
5. A  A  A 11. A  A B  A  B
6. A  A  1 12.( A  B )( A  C )  A  BC
___________________________________________________________
A, B, and C can represent a single variable or a combination of variables.
32 DEMORGAN’S THEOREMS

 DeMorgan’s law provides an easy way of finding the


complement of a Boolean function.

 DeMorgan’s theorems provide mathematical


verification of:

 the equivalency of the NAND and negative-OR


gates

 the equivalency of the NOR and negative-AND


gates.
33 DEMORGAN’S THEOREMS

 The complement of two


or more ANDed variables
is equivalent to the OR of
the complements of the
individual variables.

 The complement of two


or more ORed variables is
equivalent to the AND of
the complements of the
individual variables.
34 BOOLEAN ANALYSIS OF
LOGIC CIRCUITS
 Boolean algebra provides a concise way to express the operation
of a logic circuit formed by a combination of logic gates.

 so that the OUTPUT can be determined for various


combinations of input values.
35 BOOLEAN EXPRESSION FOR A
LOGIC CIRCUIT
 To derive the Boolean expression for a given logic
circuit, begin at the left-most inputs and work toward
the final output, writing the expression for each gate.

C CD
D
B+CD
B

A(B+CD)
A
36
CONSTRUCTING A TRUTH
TABLE FOR A LOGIC CIRCUIT

 Once the Boolean expression for a given logic circuit has been
determined, a truth table that shows the output for all possible
values of the input variables can be developed.

 Let’s take the previous circuit as the example:

A(B+CD)

 There are four variables, hence 16 (24) combinations of


values are possible.
37 CONSTRUCTING A TRUTH
TABLE FOR A LOGIC CIRCUIT
 Evaluating the expression

 To evaluate the expression A(B+CD), first find the values of


the variables that make the expression equal to 1 (using the
rules for Boolean addition & multiplication).

In this case, the expression equals 1 only if


A=1 and B+CD=1 because
A(B+CD) = 1·1 = 1
38
CONSTRUCTING A TRUTH
TABLE FOR A LOGIC CIRCUIT

 Evaluating the expression (cont’)

 Now, determine when B+CD term equals 1.

 The term B+CD=1 if either B=1 or CD=1 or if both B and


CD equal 1 because

B+CD = 1+0 = 1

B+CD = 0+1 = 1

B+CD = 1+1 = 1

 The term CD=1 only if C=1 and D=1


39
CONSTRUCTING A TRUTH
TABLE FOR A LOGIC CIRCUIT
 Evaluating the expression (cont’)

 Summary:

 A(B+CD)=1

 When A=1 and B=1 regardless of the values of C and


D

 When A=1 and C=1 and D=1 regardless of the value


of B

 The expression A(B+CD)=0 for all other value


combinations of the variables.
CONSTRUCTING A TRUTH TABLE
40
FOR A LOGIC CIRCUIT
INPUTS OUTPUT

Putting the results in A B C D A(B+CD)


0 0 0 0 0
truth table format 0 0 0 1 0

A(B+CD)=1 0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
When A=1 and 0 1 0 1 0
B=1 regardless 0 1 1 0 0

of the values 0 1 1 1 0
1 0 0 0 0
of C and D 1 0 0 1 0
When A=1 and C=1 1 0 1 0 0

and D=1 regardless of 1 0 1 1 1


1 1 0 0 1
the value of B 1 1 0 1 1
1 1 1 0 1
1 1 1 1 1
LOGICAL GATES

41
42 LOGIC GATES

 We have looked at Boolean functions in abstract


terms.
 In this section, we see that Boolean functions are
implemented in digital computer circuits called
gates.
 A GATE is an electronic device that produces a
result based on two or more input values.
In reality, gates consist of one to six
transistors, but digital designers think of them
as a single unit.
43 LOGIC GATES
 Electronic digital circuits are also called Logic circuits because with
the proper input ,they establish logical manipulation path.
44 LOGIC GATES (Timing Diagram)
 LOGICAL MANIPULATION PATH.
45 LOGIC GATES

 The three simplest gates are the AND, OR, and NOT
gates.

 They correspond directly to their respective Boolean


operations, as you can see by their truth tables.
46 LOGIC GATES
 Another very useful gate is the exclusive OR
(XOR) gate.
 The output of the XOR operation is true only when
the values of the inputs differ.

Note the special symbol  for the XOR operation.


47 LOGIC GATES

 NAND and NOR


are two very
important gates.
Their symbols and
truth tables are
shown at the right.
48 LOGIC GATES

 NAND and NOR are known as


universal gates because ANY
Boolean function can be constructed
using only NAND or only NOR
gates.
ALLAH HAFIZ

You might also like