Chapter 1
Chapter 1
Chapter 1
•.
It uses only 2 symbols i.e. 0 and 1.
•.
Also called base 2 number system.
Example
Binary Number: (10101)2
2. Decimal Number System
•
The number system that we use in our
day-to-day life is the decimal number
system.
•
The number system with base 10 is called
as decimal number system.
•
It uses 10 symbols i.e. 0,1,2,3,4,5,6,7,8,9
Example
Decimal Number: (123)10
3. Octal Number System
•.
The number system with base 8 is called
as octal number system.
•.
•.
Also called base 8 number system.
•.
•.
It uses 8 symbols i.e. 0,1,2,3,4,5,6,7
Example
Octal Number: (12035)8
4. Hexadecimal Number System
•
The number system with base 16 is called
as hexadecimal number system.
•
The number system uses 10
digits(0,1,2,3,4,5,6,7,8,9)and 6
letters(A,B,C,D,E,F)
•
A = 10, B = 11, C = 12, D = 13, E = 14,
F = 15.
•
Also called base 16 number system.
Example
Hexadecimal Number: (19F5)16
Number Conversions:
1. Decimal to Binary
2. Decimal to Octal
3. Decimal to Hexadecimal
•
Decimal to Binary Number System
Example :-Convert (2910) to binary form.
(0.65625)10 =(0.10101)2
Example :-Convert (25.50)10 to binary form.
a) Consider Integer part i.e. 25
(25)10 =(11001)2
b) Consider Fractional part i.e. 0.50
(0.50)10 =(0.1)2
Therefore, (25.50)10 = ((11001.1)
2
•
Decimal to Octal Number System
Example :-Convert (29)10 to it’s octal form.
Step Operation Result/Quotient Remainder
Step 1 29 / 8 3 5
Step 2 3/8 0 3
Step 2 1 1 1 0 1 (16 + 8 + 4 + 0 + 1)
Step 3 1 1 1 0 1 (29)10
Step 2 1 1 1. 0 1 (4 + 2 + 1+0+1/4)
Step 3 1 1 1. 0 1 (7+0.25)10
1. BCD
2. Gray
3. ASCII
4. EBCDIC
1. BCD(Binary Coded Decimal)
●
This code is also called as 8-4-2-1 code.
●
8,4,2,1 are the weights of four digits of each
decimal number.
Decimal Number BCD Binary
0 0000 0000
1 0001 0001
2 0010 0010
3 0011 0011
4 0100 0100
5 0101 0101
6 0110 0110
7 0111 0111
8 1000 1000
9 1001 1001
Decimal Number Binary Number BCD Number
What is the difference between binary and
bcd number?
● In a Binary Code, we convert the whole Decimal
number into its binary form.
● In BCD, each of the digit of the decimal number is
represented by its binary form in 4 bits.
● Let us take an Example:
Suppose a number 123
● Its Binary Form will be 01111011
● Its BCD will be 0001 0010 0011
2. Gray Code:
● It is also known as the reflected binary code
(RBC)
● It is an ordering of the binary number system
such that two successive values differ in only
one bit (binary digit).
Decimal Binary Gray
0 0000 0000
1 0001 0001
2 0010 0011
3 0011 0010
4 0100 0110
5 0101 0111
6 0110 0101
7 0111 0100
8 1000 1100
9 1001 1101
10 1010 1111
11 1011 1110
12 1100 1010
13 1101 1011
14 1110 1001
15 1111 1000
3. ASCII Code :
● ASCII stands for the "American Standard Code for
Information Interchange".
● It was designed in the early 60's, as a standard
character set for computers and electronic devices.
● ASCII is a 7-bit character set containing 128
characters.
● It contains the numbers from 0-9, the upper and
lower case English letters from A to Z, and some
special characters.
4. EBCDIC (Extended Binary Coded Decimal
Interchange Code )
● It is a binary code for alphabetic and numeric
characters that IBM developed for its larger
operating systems.
● EBCDIC uses 8 bits per character while the
original ASCII standard only used 7 bits per
character.
Binary Arithmetic
1. Complements(1's Complement and 2's
Complement)
● 1’s complement of a binary number is another
binary number obtained by toggling all bits in
it, i.e., transforming the 0 bit to 1 and the 1 bit
to 0.
Examples:
1's complement of "0111" is "1000"
1's complement of "1100" is "0011"
● 2’s complement of a binary number is 1 added
to the 1’s complement of the binary number.
Examples:
Find 2's Complement of the following
numbers
1. 01001110
2. 00110101
1.Ans:- 1's Complement of 01001110 is
10110001
● 2's Complement is obtained by adding 1 to 1's
Complement i.e.
10110001
+ 1
●
10110010
Binary Addition :The rules for binary addition are:
● e.g. 1011 and 1100
I/p Sum Carry Result
0 0 0 0 0
0 1 1 0 1
1 0 1 0 1
1 1 0 1 10
●
Binary Subtraction: The rules for binary subtraction
●
are:
e.g. 1011 and 0110(Ans: 0101)
●
Logic Gates :Digital systems are said to be
constructed by using logic gates such as Basic
gates, Universal gates and Derived gates.
● Basic Gates :
1. NOT Gate 2. AND Gate 3. OR Gate
● Universal Gates :
1. NAND 2.NOR
● Derived Gates:
1.EX-OR 2. EX-NOR
Basic Gates :
1. NOT Gate : The NOT gate or inverter is a
logic gate having only one input(A) and one
output(Y).
● Logical Symbol:
Y= A
Basic Gates :
1. NOT Gate : The NOT gate or inverter is a
logic gate having only one input(A) and one
output(Y).
● Logical Symbol:
Y= A
Truth Table:-
Input(A) Output(Y)
0 1
1 0
2. AND Gate:-
● It is a logic gate that performs the logical
multiplication on its inputs.
● The output is high(Y=1) if and only if all the
inputs to the AND gate are high i.e.1
● The output is low(Y=0) if any one or more
inputs are low(0)
● AND gate have two or more inputs and only
one output.
Logical Symbol:-
●
2. AND Gate:-
Boolean Expression:-
Y= A.B
Truth Table:-
Inputs Output
0 0 0
0 1 0
1 0 0
1 1 1
3. OR Gate:-
●
It is a logic gate that performs the logical
addition on its inputs.
●
The output is high(Y=1) if any one or both the inputs are high
i.e.1
●
The output is low(Y=0) if and only if both the inputs are low(0)
●
OR gate have two or more inputs and only one output.
3. OR Gate:-
●
Logical Symbol :-
● Boolean Expression:-
Y= A+B
● Truth Table:-
Inputs Output
0 0 0
0 1 1
1 0 1
1 1 1
Universal Gate:- 1. NAND Gate 2. NOR Gate
1. NAND Gate:-
● The term NAND can be split as NOT-AND which means
that the NAND operation can be implemented with the
combination of an AND gate and NOT gate.
● Thus NAND gate is equivalent to an AND gate followed by
NOT gate.
● NAND gate is called as “Universal Gate”because we can
construct AND,OR,NOT gates using only NAND gates.
a)Logical Symbol:-
b)Equivalent Circuit:-
● Boolean Expression:-
Y= A.B
Universal Gate:-
2. NOR Gate:-
● The term NOR can be split as NOT-OR which means that
the NOR operation can be implemented with the
combination of an OR gate and NOT gate.
● Thus NOR gate is equivalent to an OR gate followed by
NOT gate.
● NOR gate is called as “Universal Gate”because we can
construct AND,OR,NOT gates using only NAND gates.
a)Logical Symbol:-
2)Equivalent Circuit:-
● Boolean Expression:-
Y= A+B
Derived Gates:- 1. EX-OR Gate 2. EX-NOR Gate
1. EX-OR Gate:-
● It is called as derived as.
● It is a special type of gate.
● It can be used for applications such as half adder, full
adder and subtractor.
a)Logical Symbol:-
● Truth Table:- Same input output 0 otherwise 1
Inputs Output
0 0 0
0 1 1
1 0 1
1 1 0
Y= A B
Boolean Algebra :
●
Boolean algebra is a division of mathematics which deals
with operations on logical values(binary values) and
contains binary variables.
●
Boolean algebra is used to analyze and simplify the digital
circuits.
●
As it uses only binary numbers such as 0 and 1, it is calso
alled as “Binary Algebra” or “Logical Algebra”.
● Rules in boolean algebra are:
1. Variables used can have only two values. Binary 1 for
HIGH and binary 0 for LOW.
2. Complement of a variable is represented by a overbar(-).
Thus complement of variable A is represented as A.
3.ORing of variables is represented by a plus(+) sign
between them. e.g. ORing of A, B, C is represented as
A+B+C
4. ANDing of the two or more variables is represented by
writing dot between them such as A.B.C
●
● Boolean Laws:-
1. Commutative Law
2. Associative Law
3. Distributive Law
4. AND Law
5. OR Law
6. INVERSION Law
● Boolean Laws:-
1. Commutative Law:
● A . B = B . A ;The order in which two variables are AND’ed
makes no difference.
● A + B = B + A ;The order in which two variables are OR’ed
makes no difference.
● Thus the commutative law states that we can change the
sequence of the variables without having any effect on the
output of a logic circuit
● Boolean Laws:-
2. Associative Law:
● This law states that the order in which the logic operations are
performed is not at all important ultimate outcome is the same.
● A + (B + C) = (A + B) + C = A + B + C (OR Associate Law)
● A(B.C) = (A.B)C = A . B . C (AND Associate Law)
3. Distributive Law:
●
●
A(B + C) = A.B + A.C (OR Distributive Law)
●
A + (B.C) = (A + B).(A + C) (AND Distributive Law)
● Boolean Laws:-
4. AND Law :-
● A.0 = 0
● A.1 = A
● A.A = A
● A.A = 0
5. OR Law :-
● A+0 = A
● A+1 = 1
● A+A = A
● A+A = 1
● Boolean Laws:-
6. INVERSION Law :-
● This law states that if a variable is subjected to a double
inversion then it will result in the original variable itself.
● i.e. A = A
● Truth Table:-
A B AB A B A+B
0 0 1 1 1 1
0 1 1 1 0 1
1 0 1 0 1 1
1 1 0 0 0 0
● De-Morgan's Theorem :- The two theorems suggested by
De-Morgan are as follows:
Theorem 2 : A + B = A . B : NOR = Bubbled AND
●
Fan Out 10 50 25