Anda di halaman 1dari 28

Unit-II

Number Systems &


Logic Gates
Points to be Discussed
1. What is Number System?
2. Decimal
3. Binary
4. Octal
5. Hexadecimal
6. Operations on numbers
7. Logic Gates
1. Number Systems
• Computer Stores the data in a format that is not
readable by the human being directly, that’s why
we require Input Output System.
• Counting of numbers, words, letters (data )are
essential in computer there for we require
number system.
• We have two types of Number systems
 Non-Positional Number System
 Positional Number System
Non Positional Number Systems
• In early days human being counted on fingers,
stones, pebbles, or sticks to indicate values.
• Only additive approach is used in this method.
• In this method each SYMBOL regards same value
to its counted number rather than the position of
that number.
• Like in Roman I means 1, II means 2 and so on.
• Since it became difficult to perform arithmetic
positional system were developed.
Positional Number System
• In positional number system there are only few
symbols called Digits.
• The symbol presents the different value and also
depends on the position they occupy in a
number.
• The value is determined by the following three
considerations,
• The Digit Itself
• The Position of the Digit in the Number and
• The Base of the Number System
2. DECIMAL NUMBER SYSTEM
• In our Routine Number System we are using that
daily.
• If the number is 324 then
• The 3 digit value is Three, for 2 two, for 4 four.
• The position is on Hundred so Three Hundred
• And Why Because the Base is 10 so 102 at the
position.
• Start That 10 Base from 100, 101, 102 and So on.
• So as mathematical expression
(3 x 102) + (2 x 101) + (4 x 100) = 300+20+4
= 324
• So, this is Decimal positional Number system
3. BINARY NUMBER SYSTEM
• It is like decimal number system .
• Except that base is to 2 instead of 10.
• In this we have only two numbers 1 and 0 because it
must be 1 number less than the base.
• From right side of the binary number system at
rightmost position is units (20), at second position
(21), at third (22) so on.
• For example: 101012 is the binary number.
• Convert it into Decimal
(1 X 24) + (0 X 23) + (1 X 22) + (0 X 21) + (1 X 20) =
(1 X 16) + (0 X 8) + (1 X 4) + (0 X 2) + (1 X 1) =
16 + 0 + 4 + 0 + 1 = 21 That is : (101012) = (2110 )
• The short form of the binary digit is a ‘bit’.
Important table
000 0 Count
001 1 and
010 2 convert
011 3 into
100 4 Decimal
101 5
110 6
111 7
4. Octal Number System
• In this number system the base is 8.
• In this only eight symbols or digits 0, 1, 2, 3, 4, 5,
6, 7.
• Each position in an Octal number represents a
power of the base (8).
• Increase from 0 to the total number of digits in
the number.
• Example : (2057 8) = (1071 10)
• (2 x 83) + (0 x 82) + (5 x 81) + (7 x 80) =
• (2 x 512) + (0 x 64) + (5 x 8) + (7 x 1) =
• 1024 + 0 + 40 + 7 = 1071 in decimal
Hexadecimal Number system
• In this the base is 16.
• Hence the 16 symbols or digits are 0 to 15.
• In this we have 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 but
for 10 to 15 ?
• So to denote remaining six digits by A, B, C, D, E, F
respectively to 10, 11, 12, 13, 14, 15.
• Example: (1AF16) = (43110)
• (1 x 162) + (A x 161) + (F x 160) =
• (1 x 256) + (10 x 16) + (15 x 1) =
• 256 + 160 + 15 = 431
Some Operations on Numbers
• Convert Another Base to Decimal
• (110012) = ?10
• (47068) = ?10
• (1AC16) = ?10

• Ans : 1) 25 2) 2502 3) 428


Logic Gates
• All operations are carried out by means of
combinations of signals passing through circuits
called LOGIC GATES.
• “Logic Gates are an electronic circuit that
operates on one or more input signals to produce
standard output signals”
• To build electronic circuit in computer we need
combinations of multiple logic gates.
• Some basic electronic logic circuits designed and
introduced by logic gates.
The following are the gates
 AND Gate
 OR Gate
 Not Gate
 NAND Gate
 NOR Gate
• These are the physical realization of logical
Operations.
AND Gate
• This is logical MULTIPLICATION operation.
• It the circuit that generates signal of 1 only if
all the input signals are also 1.
• Two or more switches connected in series
behave as an AND gate.
• Figure sows that if both switches (A) and (B)
are ON (i.e. 1) state then only the current
reach the output point.
• This shows the truth table.
• The . Operator denotes the AND operation.
• If all the inputs are 1 then only the output is 1
else 0.
OR Gate
• It is physical realization of logical ADDITION
(OR) operation.
• It is the electronic circuit that generates an
output signal 1 if the any one input signal is 1.
• See in the next diagram the two or more
switches connected in parallel behave as an or
gate. If any switch is ON i.e. 1 then output will
be ON as 1.
Now the Truth table and the block diagram of OR gate is as below.
The + sign is use to denote the OR operation.
Block diagram symbol and truth table
for Three input AND Gate
Block diagram symbol and truth table
for Three input OR Gate
NOT Gate
• The NOT Gate is physical realization of the
complementation operation. It is electronic
circuit that generates the REVERSE of the
input signal as output signal.
• It is also known as INVERTER because it
inverts the input.
• The operation is UNARY operation defined on
single input variable.
• Hence, NOT gate always has a single input.
NOT Gate
• The – (bar) Sign is use to denote the
complementation of the input variable.
• The following are the Truth table and Block
diagram of the NOT Gate.
NAND Gate
• A NAND gate is a complemented AND Gate.
• That is, the output of NAND gate will be 1 if
any one of the input it a 0, and it will be 0 only
when all the inputs are 1.
• The following is the block diagram of the
NAND Gate.
Truth Table of NAND Gate

• The ‘ ‘ symbol is used to represent a NAND


operation in Boolean expression.
• Hence,
A B = A.B = A + B
• At the other end an AND gate followed by a NOT
gate operates as a NAND Gate.
• In the Figure the output of AND Gate will be A.B
that will be complemented by NOT Gate.
• That is A.B or A + B or A B
• It is also same for 3 inputs.
NOR Gate
• A NOR gate is complemented OR Gate.
• That is the output of a NOR gate will be 1 only
when all inputs are 0, and it will be 0 if any
input is 1.
• The ‘ ‘ symbol is used to represent a NOR
operation in Boolean expression.
• Hence, A B = A + B = A . B
• It is also denoted by A . B = A . B + A . B
•The following are the Block diagram and Truth Table of
the NOR Gate
• An OR gate followed by a NOT gate operates
as a NOR gate.
• In the figure the output of the OR gate will be
A + B that turn fed as input to the NOT gate.
Hence the final output will be complement of
A + B, which is equal to A + B or A . B or A B
or A . B.
• It is also same for the 3 inputs.

Anda mungkin juga menyukai