0% found this document useful (0 votes)
3 views

Lecture4 (Number Systems & Binary Logic)

Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Lecture4 (Number Systems & Binary Logic)

Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 23

Computer Fundamentals

Lecture # 4:
Number systems and Logical Operations
Today’s Aim

 Learning about the different Numbering


Systems
 Learning Conversion Techniques among the
different Number Systems
 Studying the Important Logical Operations
Numbers:

 Number Sense
 Counting
History of Number Systems:

 Quipu of the Inca Umpire


 Fractions in Ancient Egypt
 The Mayan Number System
 The Egyptian Number System
 The Greek Number System
 The Babylonian Number System
Main Numbering Systems:

 Decimal
 Binary
 Hexadecimal
Decimal Number System:

 Base-10 system: 0,1,2,3,4,5,6,7,8,9


 Positional Number System i.e., every place
has its own weight
 Examples:
 123.64 = 1*102 + 2*101 + 3*100 + 6*10-1 + 4*10-2
 0.456 = 4*10-1 + 5*10-2 + 6*10-3
Binary Number System:

 Base-2 system : 0,1


 Examples:
 1011001
 Used in all Digital Devices
 Why?
Hexadecimal Number System:

 Base-16 Number System :


0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
 Used for compact representation of binary
numbers. How?
Conversion:

Binary to Decimal:

10112 = 1* 20 + 1* 21 + 0* 22 + 1* 23
= 1+2+0+8 = 11

2 5 - 1

Decimal to Binary: 2 2 - 0

510 = 1012 1
Conversion (continued):

Hexadecimal to decimal:
DEAD16 = ?

Decimal to hexadecimal:
20710 = ?
Data Organization:
 Bits (Binary Digits)

 Nibbles = 4 bits

 Bytes = 8 bits

 Word = 16 bits
Logical Operations

 The value of a Boolean expression may


either be ‘true’ or ‘false’, represented by a ‘1’
or a ‘0’
 There are three basic Boolean expressions:
 AND
 OR
 NOT
 Other logic operations (derived from these
three) include ‘NAND’, ‘NOR’, ‘XOR’ etc.
Logical Operations
 AND
 ‘if any input is low (0), output is low’ or ‘output is high (1)
only if all the inputs are high’
 Two or more inputs, only one output
 OR
 ‘if any input is high, output is high’ or ‘output is low only if all
the inputs are low’
 Two or more inputs, only one output
 NOT
 ‘output is complement of the input’
 Single input, single output
Logical Operations

 Truth table
 Contains all the possible input values and their
outputs
 2n entries of a truth table show all the possible
input combinations (n = number of inputs)
 Boolean expression
 Consists of Boolean variables
 Another way to represent the input-output
relationship
Logical Operations

 Logical Diagram (circuit)


 Representation in the form of a circuit
 All the inputs and outputs can have only two
values, ‘0’ or ‘1’
Logic AND:

Truth Table Logical Diagram

x
x y z z
y
0 0 0
0 1 0
Boolean Equation
1 0 0
z  x y
1 1 1
Logic OR:

Truth Table Logical Diagram

x
x y z z
y
0 0 0
0 1 1
Boolean Equation
1 0 1
1 1 1
z  x y
Logical NOT:

Truth Table Logical Diagram

x y
x y
0 1
1 0 Boolean Equation

y  x'
Logic NAND:

Truth Table Logical Diagram

x y z x
z
y
0 0 1
0 1 1
Boolean Equation
1 0 1
1 1 0 z  x y
Logic NOR:

Truth Table Logical Diagram

x y z x
z
y
0 0 1
0 1 0
Boolean Equation
1 0 0
1 1 0 z  x y
Logic XOR:

Truth Table Logical Diagram

x
x y z z
y
0 0 0
0 1 1
Boolean Equation
1 0 1
1 1 0 z  x y
Logic XNOR:

Truth Table Logical Diagram

x y z x
z
y
0 0 1
0 1 0
Boolean Equation
1 0 0
1 1 1 z=x y
Today we Learnt:

 About Number Systems

 Conversion among different number systems

 Binary Logic

You might also like