SlideShare a Scribd company logo
Digit’s 01010
NUMBER SYSTEM 
BASE 
Symbol 
Intro…
Common Number Systems 
System Base Symbols 
Used by 
humans? 
Used in 
computers? 
Decimal 10 0, 1, … 9 Yes No 
Binary 2 0, 1 No Yes 
Octal 8 0, 1, … 7 No No 
Hexa-decimal 
16 0, 1, … 9, 
A, B, … F 
No No
Conversion Among Bases 
 The possibilities: 
Decimal Octal 
Hexadecimal 
Binary
Quick Example 
2510 = 110012 = 318 = 1916 
Base/Radix
Decimal to Decimal (just for fun) 
Decimal Octal 
Hexadecimal 
Binary
12510 => 5 x 100= 5 
2 x 101= 20 
1 x 102= 100 
125 
Base 
Weight
Binary to Decimal 
Hexadecimal 
Decimal 
Octal 
Binary
Binary to Decimal 
 Technique 
 Multiply each bit by 2n, where n is the “weight” of the bit 
 The weight is the position of the bit, starting from 0 on the right 
 Add the results
Example 
1010112 => 1 x 20 = 1 
1 x 21 = 2 
0 x 22 = 0 
1 x 23 = 8 
0 x 24 = 0 
1 x 25 = 32 
4310 
Bit “0”
Octal to Decimal 
Decimal Octal 
Hexadecimal 
Binary
Octal to Decimal 
 Technique 
 Multiply each bit by 8n, where n is the “weight” of the bit 
 The weight is the position of the bit, starting from 0 on the right 
 Add the results
Example 
7248 => 4 x 80 = 4 
2 x 81 = 16 
7 x 82 = 448 
46810
Hexadecimal to Decimal 
Decimal Octal 
Hexadecimal 
Binary
Hexadecimal to Decimal 
 Technique 
 Multiply each bit by 16n, where n is the “weight” of the bit 
 The weight is the position of the bit, starting from 0 on the right 
 Add the results
Example 
ABC16 => C x 160 = 12 x 1 = 12 
B x 161 = 11 x 16 = 176 
A x 162 = 10 x 256 = 2560 
274810
Decimal to Binary 
Decimal Octal 
Hexadecimal 
Binary
Decimal to Binary 
 Technique 
 Divide by two, keep track of the remainder 
 First remainder is bit 0 (LSB, least-significant bit) 
 Second remainder is bit 1 
 Etc.
Example 
12510 = ?2 
2 125 
2 6 2 1 
2 3 1 0 
2 1 5 1 
2 7 1 
2 3 1 
2 1 1 
0 1 
12510 = 11111012
Octal to Binary 
Decimal Octal 
Hexadecimal 
Binary
Octal to Binary 
 Technique 
 Convert each octal digit to a 3-bit equivalent binary representation
Example 
7058 = ?2 
7 0 5 
111 000 101 
7058 = 1110001012
Hexadecimal to Binary 
Decimal Octal 
Hexadecimal 
Binary
Hexadecimal to Binary 
 Technique 
 Convert each hexadecimal digit to a 4-bit equivalent binary 
representation
Example 
10AF16 = ?2 
1 0 A F 
0001 0000 1010 1111 
10AF16 = 00010000101011112
Decimal to Octal 
Decimal Octal 
Hexadecimal 
Binary
Decimal to Octal 
 Technique 
 Divide by 8 
 Keep track of the remainder
Example 
123410 = ?8 
8 1234 
8 154 2 
19 2 
8 
2 3 
8 
0 2 
123410 = 23228
Decimal to Hexadecimal 
Decimal Octal 
Hexadecimal 
Binary
Decimal to Hexadecimal 
 Technique 
 Divide by 16 
 Keep track of the remainder
Example 
123410 = ?16 
123410 = 4D216 
16 1234 
77 2 
16 
4 13 = D 
16 
0 4
Binary to Octal 
Decimal Octal 
Hexadecimal 
Binary
Binary to Octal 
 Technique 
 Group bits in threes, starting on right 
 Convert to octal digits
Example 
10110101112 = ?8 
1 011 010 111 
1 3 2 7 
10110101112 = 13278
Binary to Hexadecimal 
Decimal Octal 
Hexadecimal 
Binary
Binary to Hexadecimal 
 Technique 
 Group bits in fours, starting on right 
 Convert to hexadecimal digits
Example 
10101110112 = ?16 
10 1011 1011 
2 B B 
10101110112 = 2BB16
Octal to Hexadecimal 
Decimal Octal 
Hexadecimal 
Binary
Octal to Hexadecimal 
 Technique 
 Use binary as an intermediary
Example 
10768 = ?16 
1 0 7 6 
001 000 111 110 
2 3 E 
10768 = 23E16
Hexadecimal to Octal 
Decimal Octal 
Hexadecimal 
Binary
Hexadecimal to Octal 
 Technique 
 Use binary as an intermediary
Example 
1F0C16 = ?8 
1 F 0 C 
0001 1111 0000 1100 
1F0C16 = 174148 
1 7 4 1 4
Exercise – Convert ... 
Decimal Binary Octal 
Don’t use a calculator! 
Hexa-decimal 
33 
1110101 
703 
1AF 
Skip answer Answer
Exercise – Convert … 
Answer 
Decimal Binary Octal 
Hexa-decimal 
33 100001 41 21 
117 1110101 165 75 
451 111000011 703 1C3 
431 110101111 657 1AF
Common Powers (1 of 2) 
 Base 10 
Power Preface Symbol 
10-12 pico p 
10-9 nano n 
10-6 micro  
10-3 milli m 
103 kilo k 
106 mega M 
109 giga G 
1012 tera T 
Value 
.000000000001 
.000000001 
.000001 
.001 
1000 
1000000 
1000000000 
1000000000000
Common Powers (2 of 2) 
 Base 2 
Power Preface Symbol 
210 kilo k 
220 mega M 
230 Giga G 
Value 
1024 
1048576 
1073741824 
• What is the value of “k”, “M”, and “G”? 
• In computing, particularly w.r.t. memory, 
the base-2 interpretation generally applies
Review – multiplying powers 
 For common bases, add powers 
ab  ac = ab+c 
26  210 = 216 = 65,536 
or… 
26  210 = 64  210 = 64k
Binary Addition (1 of 2) 
 Two 1-bit values 
A B A + B 
0 0 0 
0 1 1 
1 0 1 
1 1 10 
“two”
Binary Addition (2 of 2) 
 Two n-bit values 
 Add individual bits 
 Propagate carries 
 E.g., 
10101 21 
+ 11001 + 25 
101110 46
Multiplication (1 of 3) 
 Decimal (just for fun) 
35 
x 105 
175 
000 
35 
3675
Multiplication (2 of 3) 
 Binary, two 1-bit values 
A B A  B 
0 0 0 
0 1 0 
1 0 0 
1 1 1
Multiplication (3 of 3) 
 Binary, two n-bit values 
 As with decimal values 
 E.g., 
1110 
x 1011 
1110 
1110 
0000 
1110 
10011010
Fractions 
 Decimal to decimal (just for fun) 
3.14 => 4 x 10-2 = 0.04 
1 x 10-1 = 0.1 
3 x 100 = 3 
3.14
Fractions 
 Binary to decimal 
10.1011 => 1 x 2-4 = 0.0625 
1 x 2-3 = 0.125 
0 x 2-2 = 0.0 
1 x 2-1 = 0.5 
0 x 20 = 0.0 
1 x 21 = 2.0 
2.6875
Fractions 
 Decimal to binary 
3.14579 
.14579 
x 2 
0.29158 
x 2 
0.58316 
x 2 
1.16632 
x 2 
0.33264 
x 2 
0.66528 
x 2 
1.33056 
etc. 
11.001001...
Exercise – Convert ... 
Decimal Binary Octal 
Don’t use a calculator! 
Hexa-decimal 
29.8 
101.1101 
3.07 
C.82
Exercise – Convert … 
Answer 
Decimal Binary Octal 
Hexa-decimal 
29.8 11101.110011… 35.63… 1D.CC… 
5.8125 101.1101 5.64 5.D 
3.109375 11.000111 3.07 3.1C 
12.5078125 1100.10000010 14.404 C.82
Complemented number system
Sign-Magnitude Notation 
The simplest form of representation that employs a sign bit, the 
leftmost significant bit. For an N-bit word, the rightmost N-1 
bits hold the magnitude of the integer. Thus, 
 00010010 = +18 
 10010010 = -18
Drawbacks of Sign-Magnitude 
Notation 
Addition and subtraction require a consideration of 
both the signs of the numbers, and their relative 
magnitudes, in order to carry out the requested 
operation.
1’s Complement Notation 
 Positive integers are represented in the same way as sign-magnitude 
notation. 
 A negative integer is represented by the 1's complement of 
the positive integer in sign-magnitude notation. 
 The ones complement of a number is obtained by 
complementing each one of the bits, i.e., a 1 is replaced by a 
0, and a 0 is replaced by a 1. 
 18 (Base 10) = 00010010 
 -18 = 1's complement of 18 = 11101101
2’s Complement Notation 
The 2's complement representation of positive 
integers is the same as in sign-magnitude 
representation. 
A negative number is represented by the 2's 
complement of the positive integer with the same 
magnitude. 
1. Perform the 1's complement operation. 
2. Treating the result as an unsigned binary integer, 
add 1.
2’s Complement Example 
18 = 00010010 
1's complement = 11101101 
+1 
________ 
2’S of 18 = 11101110 = -18d
Binary Addition and Subtration 
The simplest implementation is one in which the 
numbers involved can be treated as unsigned 
integers for purposes of addition. 
1’s complement Addition 
2’s complement Addition
1’s complement Addition 
 Consider the Subtrahend & Minuend. 
 Calculate the 1’s complement of the Subtrahend number. 
 Add it to the Minuend 
 If the resulting is producing any carry then add the carry to 
the LSB of the Result the sign is same as of the Minuend. 
 If there is no carry then again take the 1’s complement of the 
result and place minus sign before the result. 
 This is the Require Result.
Example 
ex. 
+1 0001 Minuend 
-6 0110 Subtrahend 
1’s complement of 6 = 1001 
Add : 0001 Minuend 
1001 1’s Complement of Subtrahend 
Result =1010 (No carry) 
Again take the 1’ s Complement of 1010 = - 0101 
Answer = > -5
Ones Complement End Around Carry 
Perform the operation 
-2 + -4 
1’s complement of -2 = 1101 
1’s complement of -4 = 1011 
------- 
1)1000 
--> 1 
-------- 
1001 = -6
2’s complement Addition 
 Calculate the 2’s complement of the Subtrahend number. 
 Add the 2’s complement to the Minuend Number 
 If the resultant has a carry discard it & this is the final Ans. 
 Else if there is no carry calculate the 2’s complement of the 
Resultant. 
 This is the final Answer.
2’s Complement Addition 
: a)5 - 7 
Binary equivalent of 7 = 0111 
1’s complement of 7 = 1000 
2’s complement of 7 = 1001 
Now add 5 = 0101 
+ (-)7 = 1001 
1110 = -2 
 In 2’s Complement addition, the Carry Out of the most significant bit is 
ignored!
8421 BCD Code 
 In the 8421 Binary Coded Decimal (BCD) representation each 
decimal digit is converted to its 4-bit pure binary equivalent. 
 This coding is an example of a binary coded (each decimal 
number maps to four bits) weighted (each bit represents a 
number: 1, 2, 4, etc.) code. 
 57dec = 0101 0111bcd
Questions 
 Q. What is the decimal number for the following 8421 BCD 
Code 0001 1001 0111 0010bcd? 
 A. 1972 
 Q. What is the 8421 BCD Code for the decimal number 421? 
 A. 0100 0010 0001
Gray Code 
 Gray coding is used for its speed & freedom from errors. 
 In BCD or 8421 BCD when counting from 7 (0111) to 8 (1000) 
requires 4 bits to be changed simultaneously. 
 If this does not happen then various numbers could be 
momentarily generated during the transition so creating 
spurious numbers which could be read. 
 Gray coding avoids this since only one bit changes between 
subsequent numbers. Two simple rules. 
 1. Start with all 0s. 
 2. Proceed by changing the least significant bit (lsb) which will bring 
about a new state.
Gray Code Continued 
Decimal Gray Code 
0 0000 
1 0001 
2 0011 
3 0010 
4 0110 
5 0111 
6 0101 
7 0100 
8 1100 
9 1101 
10 1111 
11 1110 
12 1010 
13 1011 
14 1001 
15 1000
Excess-3 Code 
 Excess-3 is a non weighted code used to express decimal 
numbers. The code derives its name from the fact that each 
binary code is the corresponding 8421 code plus 0011(3). 
 1000 of 8421 = 1011 in Excess-3
ASCII Code 
 ASCII: American Standard Code for Information Interchange 
 The standard ASCII code defines 128 character codes (from 0 
to 127), of which, the first 32 are control codes (non-printable), 
and the other 96 are representable characters. 
 In addition to the 128 standard ASCII codes there are other 
128 that are known as extended ASCII, and that are platform-dependent.
ASCII Code Table
Boolean Algebra
Boolean function 
• Boolean function: Mapping from Boolean variables to 
a Boolean value. 
• Truth table: 
Represents relationship between a Boolean function and 
its binary variables. 
It enumerates all possible combinations of arguments and 
the corresponding function values.
Boolean function and logic diagram 
• Boolean algebra: Deals with binary variables and logic 
operations operating on those variables. 
• Logic diagram: Composed of graphic symbols for logic gates. A 
simple circuit sketch that represents inputs and outputs of 
Boolean functions.
Gates 
 Refer to the hardware to implement Boolean operators. 
 The most basic gates are
Boolean function and truth table
Basic identities of boolean algebra 
• A Boolean algebra is a closed algebraic system containing set 
of elements and the operators. 
• The . (dot) operator is known as logical And. 
• The + (plus) which refer to logical OR.
Basic Identities of Boolean Algebra 
(1) x + 0 = x 
(2) x · 0 = 0 
(3) x + 1 = 1 
(4) x · 1 = x 
(5) x + x = x 
(6) x · x = x 
(7) x + x’ = 1 
(8) x · x’ = 0 
(9) x + y = y + x 
(10) xy = yx 
(11) x + ( y + z ) = ( x + y ) + z 
(12) x (yz) = (xy) z 
X I/P O/P = X + I/P 
0 0 0 = > X 
1 0 1 => X 
X I/P O/P = X . I/P 
0 0 0 
1 0 0 
X I/P O/P = X . I/P 
0 1 0 => X 
1 1 1 => X
Basic Identities of Boolean Algebra (DeMorgan’s 
Theorem) 
(15) ( x + y )’ = x’ y’ 
(16) ( xy )’ = x’ + y’ 
(17) (x’)’ = x
Function Minimization using Boolean Algebra 
 Examples: 
(a) a + ab = a(1+b)=a 
(b) a(a + b) = a.a +ab=a+ab=a(1+b)=a. 
(c) a + a'b = (a + a')(a + b)=1(a + b) =a+b 
(d) a(a' + b) = a. a' +ab=0+ab=ab
Try 
 F = abc + abc’ + a’c
The other type of question 
Show that; 
1- ab + ab' = a 
2- (a + b)(a + b') = a 1- ab + ab' = a(b+b') = a.1=a 
2- (a + b)(a + b') = a.a +a.b' +a.b+b.b' 
= a + a.b' +a.b + 0 
= a + a.(b' +b) + 0 
= a + a.1 + 0 
= a + a = a
More Examples 
 Show that; 
(a) ab + ab'c = ab + ac 
(b) (a + b)(a + b' + c) = a + bc 
(a) ab + ab'c = a(b + b'c) 
= a((b+b').(b+c))=a(b+c)=ab+ac 
(b) (a + b)(a + b' + c) 
= (a.a + a.b' + a.c + ab +b.b' +bc) 
= (a + ab’ + a.c + a.b + 0 + b.c) 
=( a(1+b’ + c + b)+ b.c) 
= ( a+ b.c)
Principle of Duality 
 The dual of a statement S is obtained by interchanging . and 
+; 0 and 1. 
 Dual of (a*1)*(0+a’) = 0 is (a+0)+(1*a’) = 1 
 Dual of any theorem in a Boolean Algebra is also a theorem. 
 This is called the Principle of Duality.
DeMorgan's Theorem 
(a) (a + b)' = a'b' 
(b) (ab)' = a' + b' 
Generalized DeMorgan's Theorem 
(a) (a + b + … z)' = a'b' … z' 
(b) (a.b … z)' = a' + b' + … z‘
DeMorgan's Theorem 
 F = ab + c’d’ 
 F’ = ?? 
 F = ab + c’d’ + b’d 
 F’ = ?? 
 Show that: (a + b.c)' = a'.b' + a'.c'
More DeMorgan's example 
Show that: (a(b + z(x + a')))' =a' + b' (z' + x') 
Sol: (a(b + z(x + a')))' = a' + (b + z(x + a'))' 
= a' + b' (z(x + a'))' 
= a' + b' (z' + (x + a')') 
= a' + b' (z' + x'(a')') 
= a' + b' (z' + x'a) 
=a‘+b' z' + b'x'a 
=(a‘+ b'x'a) + b' z' 
=(a‘+ b'x‘)(a +a‘) + b' z' 
= a‘+ b'x‘+ b' z‘ 
= a' + b' (z' + x')
More Examples 
(a(b + c) + a'b)'=b'(a' + c') 
ab + a'c + bc = ab + a'c 
(a + b)(a' + c)(b + c) = (a + b)(a' + c)

More Related Content

What's hot

Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital Electronics
Janki Shah
 
Digital Logic Design
Digital Logic Design Digital Logic Design
Digital Logic Design
Vaagdevi College of Engineering
 
BCD,GRAY and EXCESS 3 codes
BCD,GRAY and EXCESS 3 codesBCD,GRAY and EXCESS 3 codes
BCD,GRAY and EXCESS 3 codes
student
 
Digital Logic Circuits
Digital Logic CircuitsDigital Logic Circuits
Digital Logic Circuits
sathish sak
 
Bcd to excess 3 code converter
Bcd to excess 3 code converterBcd to excess 3 code converter
Bcd to excess 3 code converter
Ushaswini Chowdary
 
Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes
VandanaPagar1
 
Number systems ppt
Number systems pptNumber systems ppt
Number systems ppt
sudarmani rajagopal
 
Bcd
BcdBcd
Verilog HDL
Verilog HDLVerilog HDL
Verilog HDL
Mantra VLSI
 
Ripple counter
Ripple counterRipple counter
Ripple counter
chandkec
 
Register in Digital Logic
Register in Digital LogicRegister in Digital Logic
Register in Digital Logic
ISMT College
 
Digital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systemsDigital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systems
Imran Waris
 
digital logic design number system
digital logic design number systemdigital logic design number system
digital logic design number system
Nallapati Anindra
 
Number system and codes
Number system and codesNumber system and codes
Number system and codes
Abhiraj Bohra
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
missstevenson01
 
Verilog data types -For beginners
Verilog data types -For beginnersVerilog data types -For beginners
Verilog data types -For beginners
Dr.YNM
 
Floating point Numbers
Floating point NumbersFloating point Numbers
Floating point Numbers
ciyamala kushbu
 
BCD.
BCD.BCD.
Number system
Number systemNumber system
Number systemkashee99
 

What's hot (20)

Codes
CodesCodes
Codes
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital Electronics
 
Digital Logic Design
Digital Logic Design Digital Logic Design
Digital Logic Design
 
BCD,GRAY and EXCESS 3 codes
BCD,GRAY and EXCESS 3 codesBCD,GRAY and EXCESS 3 codes
BCD,GRAY and EXCESS 3 codes
 
Digital Logic Circuits
Digital Logic CircuitsDigital Logic Circuits
Digital Logic Circuits
 
Bcd to excess 3 code converter
Bcd to excess 3 code converterBcd to excess 3 code converter
Bcd to excess 3 code converter
 
Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes
 
Number systems ppt
Number systems pptNumber systems ppt
Number systems ppt
 
Bcd
BcdBcd
Bcd
 
Verilog HDL
Verilog HDLVerilog HDL
Verilog HDL
 
Ripple counter
Ripple counterRipple counter
Ripple counter
 
Register in Digital Logic
Register in Digital LogicRegister in Digital Logic
Register in Digital Logic
 
Digital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systemsDigital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systems
 
digital logic design number system
digital logic design number systemdigital logic design number system
digital logic design number system
 
Number system and codes
Number system and codesNumber system and codes
Number system and codes
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
 
Verilog data types -For beginners
Verilog data types -For beginnersVerilog data types -For beginners
Verilog data types -For beginners
 
Floating point Numbers
Floating point NumbersFloating point Numbers
Floating point Numbers
 
BCD.
BCD.BCD.
BCD.
 
Number system
Number systemNumber system
Number system
 

Similar to Number system

01.number systems
01.number systems01.number systems
01.number systemsrasha3
 
01.number systems
01.number systems01.number systems
01.number systems
Sripati Mahapatra
 
number system
number systemnumber system
number system
Pawan Mishra
 
Chapter two FHI.pptx
Chapter two FHI.pptxChapter two FHI.pptx
Chapter two FHI.pptx
ODAATUBE1
 
ch2.pdf
ch2.pdfch2.pdf
Binary octal
Binary octalBinary octal
Binary octaldrdipo4
 
digital-electronics.pptx
digital-electronics.pptxdigital-electronics.pptx
digital-electronics.pptx
sulekhasaxena2
 
Alu1
Alu1Alu1
Chapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbersChapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbers
Mohammad Bashartullah
 
Data representation
Data representationData representation
Data representation
Chew Hoong
 
Digital Logic Design.pptx
Digital Logic Design.pptxDigital Logic Design.pptx
Digital Logic Design.pptx
AminaZahid16
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
amudhak10
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
amudhak10
 
unit-i-number-systems.pdf
unit-i-number-systems.pdfunit-i-number-systems.pdf
unit-i-number-systems.pdf
RameshK531901
 
uyuyuy.pdf
uyuyuy.pdfuyuyuy.pdf
uyuyuy.pdf
MariaJoseph591921
 
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptxchapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
Surendra Loya
 

Similar to Number system (20)

01.number systems
01.number systems01.number systems
01.number systems
 
01.Number Systems
01.Number Systems01.Number Systems
01.Number Systems
 
01.number systems
01.number systems01.number systems
01.number systems
 
number system
number systemnumber system
number system
 
Chapter two FHI.pptx
Chapter two FHI.pptxChapter two FHI.pptx
Chapter two FHI.pptx
 
ch2.pdf
ch2.pdfch2.pdf
ch2.pdf
 
Binary octal
Binary octalBinary octal
Binary octal
 
digital-electronics.pptx
digital-electronics.pptxdigital-electronics.pptx
digital-electronics.pptx
 
Alu1
Alu1Alu1
Alu1
 
Chapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbersChapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbers
 
Data representation
Data representationData representation
Data representation
 
Digital Logic Design.pptx
Digital Logic Design.pptxDigital Logic Design.pptx
Digital Logic Design.pptx
 
Okkkkk
OkkkkkOkkkkk
Okkkkk
 
Lec 02
Lec 02Lec 02
Lec 02
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
 
09 Arithmetic
09  Arithmetic09  Arithmetic
09 Arithmetic
 
unit-i-number-systems.pdf
unit-i-number-systems.pdfunit-i-number-systems.pdf
unit-i-number-systems.pdf
 
uyuyuy.pdf
uyuyuy.pdfuyuyuy.pdf
uyuyuy.pdf
 
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptxchapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
 

More from Mantra VLSI

Flip Chip technology
Flip Chip technologyFlip Chip technology
Flip Chip technology
Mantra VLSI
 
Physical design
Physical design Physical design
Physical design
Mantra VLSI
 
Basic electronics
Basic electronicsBasic electronics
Basic electronics
Mantra VLSI
 
Ethertnet data transfer.ppt
Ethertnet data transfer.pptEthertnet data transfer.ppt
Ethertnet data transfer.ppt
Mantra VLSI
 
CRC Error coding technique
CRC Error coding techniqueCRC Error coding technique
CRC Error coding technique
Mantra VLSI
 
verilog code
verilog codeverilog code
verilog code
Mantra VLSI
 
Divide by N clock
Divide by N clockDivide by N clock
Divide by N clock
Mantra VLSI
 
Synthesis
SynthesisSynthesis
Synthesis
Mantra VLSI
 

More from Mantra VLSI (8)

Flip Chip technology
Flip Chip technologyFlip Chip technology
Flip Chip technology
 
Physical design
Physical design Physical design
Physical design
 
Basic electronics
Basic electronicsBasic electronics
Basic electronics
 
Ethertnet data transfer.ppt
Ethertnet data transfer.pptEthertnet data transfer.ppt
Ethertnet data transfer.ppt
 
CRC Error coding technique
CRC Error coding techniqueCRC Error coding technique
CRC Error coding technique
 
verilog code
verilog codeverilog code
verilog code
 
Divide by N clock
Divide by N clockDivide by N clock
Divide by N clock
 
Synthesis
SynthesisSynthesis
Synthesis
 

Recently uploaded

TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 

Recently uploaded (20)

TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 

Number system

  • 2. NUMBER SYSTEM BASE Symbol Intro…
  • 3. Common Number Systems System Base Symbols Used by humans? Used in computers? Decimal 10 0, 1, … 9 Yes No Binary 2 0, 1 No Yes Octal 8 0, 1, … 7 No No Hexa-decimal 16 0, 1, … 9, A, B, … F No No
  • 4. Conversion Among Bases  The possibilities: Decimal Octal Hexadecimal Binary
  • 5. Quick Example 2510 = 110012 = 318 = 1916 Base/Radix
  • 6. Decimal to Decimal (just for fun) Decimal Octal Hexadecimal Binary
  • 7. 12510 => 5 x 100= 5 2 x 101= 20 1 x 102= 100 125 Base Weight
  • 8. Binary to Decimal Hexadecimal Decimal Octal Binary
  • 9. Binary to Decimal  Technique  Multiply each bit by 2n, where n is the “weight” of the bit  The weight is the position of the bit, starting from 0 on the right  Add the results
  • 10. Example 1010112 => 1 x 20 = 1 1 x 21 = 2 0 x 22 = 0 1 x 23 = 8 0 x 24 = 0 1 x 25 = 32 4310 Bit “0”
  • 11. Octal to Decimal Decimal Octal Hexadecimal Binary
  • 12. Octal to Decimal  Technique  Multiply each bit by 8n, where n is the “weight” of the bit  The weight is the position of the bit, starting from 0 on the right  Add the results
  • 13. Example 7248 => 4 x 80 = 4 2 x 81 = 16 7 x 82 = 448 46810
  • 14. Hexadecimal to Decimal Decimal Octal Hexadecimal Binary
  • 15. Hexadecimal to Decimal  Technique  Multiply each bit by 16n, where n is the “weight” of the bit  The weight is the position of the bit, starting from 0 on the right  Add the results
  • 16. Example ABC16 => C x 160 = 12 x 1 = 12 B x 161 = 11 x 16 = 176 A x 162 = 10 x 256 = 2560 274810
  • 17. Decimal to Binary Decimal Octal Hexadecimal Binary
  • 18. Decimal to Binary  Technique  Divide by two, keep track of the remainder  First remainder is bit 0 (LSB, least-significant bit)  Second remainder is bit 1  Etc.
  • 19. Example 12510 = ?2 2 125 2 6 2 1 2 3 1 0 2 1 5 1 2 7 1 2 3 1 2 1 1 0 1 12510 = 11111012
  • 20. Octal to Binary Decimal Octal Hexadecimal Binary
  • 21. Octal to Binary  Technique  Convert each octal digit to a 3-bit equivalent binary representation
  • 22. Example 7058 = ?2 7 0 5 111 000 101 7058 = 1110001012
  • 23. Hexadecimal to Binary Decimal Octal Hexadecimal Binary
  • 24. Hexadecimal to Binary  Technique  Convert each hexadecimal digit to a 4-bit equivalent binary representation
  • 25. Example 10AF16 = ?2 1 0 A F 0001 0000 1010 1111 10AF16 = 00010000101011112
  • 26. Decimal to Octal Decimal Octal Hexadecimal Binary
  • 27. Decimal to Octal  Technique  Divide by 8  Keep track of the remainder
  • 28. Example 123410 = ?8 8 1234 8 154 2 19 2 8 2 3 8 0 2 123410 = 23228
  • 29. Decimal to Hexadecimal Decimal Octal Hexadecimal Binary
  • 30. Decimal to Hexadecimal  Technique  Divide by 16  Keep track of the remainder
  • 31. Example 123410 = ?16 123410 = 4D216 16 1234 77 2 16 4 13 = D 16 0 4
  • 32. Binary to Octal Decimal Octal Hexadecimal Binary
  • 33. Binary to Octal  Technique  Group bits in threes, starting on right  Convert to octal digits
  • 34. Example 10110101112 = ?8 1 011 010 111 1 3 2 7 10110101112 = 13278
  • 35. Binary to Hexadecimal Decimal Octal Hexadecimal Binary
  • 36. Binary to Hexadecimal  Technique  Group bits in fours, starting on right  Convert to hexadecimal digits
  • 37. Example 10101110112 = ?16 10 1011 1011 2 B B 10101110112 = 2BB16
  • 38. Octal to Hexadecimal Decimal Octal Hexadecimal Binary
  • 39. Octal to Hexadecimal  Technique  Use binary as an intermediary
  • 40. Example 10768 = ?16 1 0 7 6 001 000 111 110 2 3 E 10768 = 23E16
  • 41. Hexadecimal to Octal Decimal Octal Hexadecimal Binary
  • 42. Hexadecimal to Octal  Technique  Use binary as an intermediary
  • 43. Example 1F0C16 = ?8 1 F 0 C 0001 1111 0000 1100 1F0C16 = 174148 1 7 4 1 4
  • 44. Exercise – Convert ... Decimal Binary Octal Don’t use a calculator! Hexa-decimal 33 1110101 703 1AF Skip answer Answer
  • 45. Exercise – Convert … Answer Decimal Binary Octal Hexa-decimal 33 100001 41 21 117 1110101 165 75 451 111000011 703 1C3 431 110101111 657 1AF
  • 46. Common Powers (1 of 2)  Base 10 Power Preface Symbol 10-12 pico p 10-9 nano n 10-6 micro  10-3 milli m 103 kilo k 106 mega M 109 giga G 1012 tera T Value .000000000001 .000000001 .000001 .001 1000 1000000 1000000000 1000000000000
  • 47. Common Powers (2 of 2)  Base 2 Power Preface Symbol 210 kilo k 220 mega M 230 Giga G Value 1024 1048576 1073741824 • What is the value of “k”, “M”, and “G”? • In computing, particularly w.r.t. memory, the base-2 interpretation generally applies
  • 48. Review – multiplying powers  For common bases, add powers ab  ac = ab+c 26  210 = 216 = 65,536 or… 26  210 = 64  210 = 64k
  • 49. Binary Addition (1 of 2)  Two 1-bit values A B A + B 0 0 0 0 1 1 1 0 1 1 1 10 “two”
  • 50. Binary Addition (2 of 2)  Two n-bit values  Add individual bits  Propagate carries  E.g., 10101 21 + 11001 + 25 101110 46
  • 51. Multiplication (1 of 3)  Decimal (just for fun) 35 x 105 175 000 35 3675
  • 52. Multiplication (2 of 3)  Binary, two 1-bit values A B A  B 0 0 0 0 1 0 1 0 0 1 1 1
  • 53. Multiplication (3 of 3)  Binary, two n-bit values  As with decimal values  E.g., 1110 x 1011 1110 1110 0000 1110 10011010
  • 54. Fractions  Decimal to decimal (just for fun) 3.14 => 4 x 10-2 = 0.04 1 x 10-1 = 0.1 3 x 100 = 3 3.14
  • 55. Fractions  Binary to decimal 10.1011 => 1 x 2-4 = 0.0625 1 x 2-3 = 0.125 0 x 2-2 = 0.0 1 x 2-1 = 0.5 0 x 20 = 0.0 1 x 21 = 2.0 2.6875
  • 56. Fractions  Decimal to binary 3.14579 .14579 x 2 0.29158 x 2 0.58316 x 2 1.16632 x 2 0.33264 x 2 0.66528 x 2 1.33056 etc. 11.001001...
  • 57. Exercise – Convert ... Decimal Binary Octal Don’t use a calculator! Hexa-decimal 29.8 101.1101 3.07 C.82
  • 58. Exercise – Convert … Answer Decimal Binary Octal Hexa-decimal 29.8 11101.110011… 35.63… 1D.CC… 5.8125 101.1101 5.64 5.D 3.109375 11.000111 3.07 3.1C 12.5078125 1100.10000010 14.404 C.82
  • 60. Sign-Magnitude Notation The simplest form of representation that employs a sign bit, the leftmost significant bit. For an N-bit word, the rightmost N-1 bits hold the magnitude of the integer. Thus,  00010010 = +18  10010010 = -18
  • 61. Drawbacks of Sign-Magnitude Notation Addition and subtraction require a consideration of both the signs of the numbers, and their relative magnitudes, in order to carry out the requested operation.
  • 62. 1’s Complement Notation  Positive integers are represented in the same way as sign-magnitude notation.  A negative integer is represented by the 1's complement of the positive integer in sign-magnitude notation.  The ones complement of a number is obtained by complementing each one of the bits, i.e., a 1 is replaced by a 0, and a 0 is replaced by a 1.  18 (Base 10) = 00010010  -18 = 1's complement of 18 = 11101101
  • 63. 2’s Complement Notation The 2's complement representation of positive integers is the same as in sign-magnitude representation. A negative number is represented by the 2's complement of the positive integer with the same magnitude. 1. Perform the 1's complement operation. 2. Treating the result as an unsigned binary integer, add 1.
  • 64. 2’s Complement Example 18 = 00010010 1's complement = 11101101 +1 ________ 2’S of 18 = 11101110 = -18d
  • 65. Binary Addition and Subtration The simplest implementation is one in which the numbers involved can be treated as unsigned integers for purposes of addition. 1’s complement Addition 2’s complement Addition
  • 66. 1’s complement Addition  Consider the Subtrahend & Minuend.  Calculate the 1’s complement of the Subtrahend number.  Add it to the Minuend  If the resulting is producing any carry then add the carry to the LSB of the Result the sign is same as of the Minuend.  If there is no carry then again take the 1’s complement of the result and place minus sign before the result.  This is the Require Result.
  • 67. Example ex. +1 0001 Minuend -6 0110 Subtrahend 1’s complement of 6 = 1001 Add : 0001 Minuend 1001 1’s Complement of Subtrahend Result =1010 (No carry) Again take the 1’ s Complement of 1010 = - 0101 Answer = > -5
  • 68. Ones Complement End Around Carry Perform the operation -2 + -4 1’s complement of -2 = 1101 1’s complement of -4 = 1011 ------- 1)1000 --> 1 -------- 1001 = -6
  • 69. 2’s complement Addition  Calculate the 2’s complement of the Subtrahend number.  Add the 2’s complement to the Minuend Number  If the resultant has a carry discard it & this is the final Ans.  Else if there is no carry calculate the 2’s complement of the Resultant.  This is the final Answer.
  • 70. 2’s Complement Addition : a)5 - 7 Binary equivalent of 7 = 0111 1’s complement of 7 = 1000 2’s complement of 7 = 1001 Now add 5 = 0101 + (-)7 = 1001 1110 = -2  In 2’s Complement addition, the Carry Out of the most significant bit is ignored!
  • 71. 8421 BCD Code  In the 8421 Binary Coded Decimal (BCD) representation each decimal digit is converted to its 4-bit pure binary equivalent.  This coding is an example of a binary coded (each decimal number maps to four bits) weighted (each bit represents a number: 1, 2, 4, etc.) code.  57dec = 0101 0111bcd
  • 72. Questions  Q. What is the decimal number for the following 8421 BCD Code 0001 1001 0111 0010bcd?  A. 1972  Q. What is the 8421 BCD Code for the decimal number 421?  A. 0100 0010 0001
  • 73. Gray Code  Gray coding is used for its speed & freedom from errors.  In BCD or 8421 BCD when counting from 7 (0111) to 8 (1000) requires 4 bits to be changed simultaneously.  If this does not happen then various numbers could be momentarily generated during the transition so creating spurious numbers which could be read.  Gray coding avoids this since only one bit changes between subsequent numbers. Two simple rules.  1. Start with all 0s.  2. Proceed by changing the least significant bit (lsb) which will bring about a new state.
  • 74. Gray Code Continued Decimal Gray Code 0 0000 1 0001 2 0011 3 0010 4 0110 5 0111 6 0101 7 0100 8 1100 9 1101 10 1111 11 1110 12 1010 13 1011 14 1001 15 1000
  • 75. Excess-3 Code  Excess-3 is a non weighted code used to express decimal numbers. The code derives its name from the fact that each binary code is the corresponding 8421 code plus 0011(3).  1000 of 8421 = 1011 in Excess-3
  • 76. ASCII Code  ASCII: American Standard Code for Information Interchange  The standard ASCII code defines 128 character codes (from 0 to 127), of which, the first 32 are control codes (non-printable), and the other 96 are representable characters.  In addition to the 128 standard ASCII codes there are other 128 that are known as extended ASCII, and that are platform-dependent.
  • 79. Boolean function • Boolean function: Mapping from Boolean variables to a Boolean value. • Truth table: Represents relationship between a Boolean function and its binary variables. It enumerates all possible combinations of arguments and the corresponding function values.
  • 80. Boolean function and logic diagram • Boolean algebra: Deals with binary variables and logic operations operating on those variables. • Logic diagram: Composed of graphic symbols for logic gates. A simple circuit sketch that represents inputs and outputs of Boolean functions.
  • 81. Gates  Refer to the hardware to implement Boolean operators.  The most basic gates are
  • 82. Boolean function and truth table
  • 83. Basic identities of boolean algebra • A Boolean algebra is a closed algebraic system containing set of elements and the operators. • The . (dot) operator is known as logical And. • The + (plus) which refer to logical OR.
  • 84. Basic Identities of Boolean Algebra (1) x + 0 = x (2) x · 0 = 0 (3) x + 1 = 1 (4) x · 1 = x (5) x + x = x (6) x · x = x (7) x + x’ = 1 (8) x · x’ = 0 (9) x + y = y + x (10) xy = yx (11) x + ( y + z ) = ( x + y ) + z (12) x (yz) = (xy) z X I/P O/P = X + I/P 0 0 0 = > X 1 0 1 => X X I/P O/P = X . I/P 0 0 0 1 0 0 X I/P O/P = X . I/P 0 1 0 => X 1 1 1 => X
  • 85. Basic Identities of Boolean Algebra (DeMorgan’s Theorem) (15) ( x + y )’ = x’ y’ (16) ( xy )’ = x’ + y’ (17) (x’)’ = x
  • 86. Function Minimization using Boolean Algebra  Examples: (a) a + ab = a(1+b)=a (b) a(a + b) = a.a +ab=a+ab=a(1+b)=a. (c) a + a'b = (a + a')(a + b)=1(a + b) =a+b (d) a(a' + b) = a. a' +ab=0+ab=ab
  • 87. Try  F = abc + abc’ + a’c
  • 88. The other type of question Show that; 1- ab + ab' = a 2- (a + b)(a + b') = a 1- ab + ab' = a(b+b') = a.1=a 2- (a + b)(a + b') = a.a +a.b' +a.b+b.b' = a + a.b' +a.b + 0 = a + a.(b' +b) + 0 = a + a.1 + 0 = a + a = a
  • 89. More Examples  Show that; (a) ab + ab'c = ab + ac (b) (a + b)(a + b' + c) = a + bc (a) ab + ab'c = a(b + b'c) = a((b+b').(b+c))=a(b+c)=ab+ac (b) (a + b)(a + b' + c) = (a.a + a.b' + a.c + ab +b.b' +bc) = (a + ab’ + a.c + a.b + 0 + b.c) =( a(1+b’ + c + b)+ b.c) = ( a+ b.c)
  • 90. Principle of Duality  The dual of a statement S is obtained by interchanging . and +; 0 and 1.  Dual of (a*1)*(0+a’) = 0 is (a+0)+(1*a’) = 1  Dual of any theorem in a Boolean Algebra is also a theorem.  This is called the Principle of Duality.
  • 91. DeMorgan's Theorem (a) (a + b)' = a'b' (b) (ab)' = a' + b' Generalized DeMorgan's Theorem (a) (a + b + … z)' = a'b' … z' (b) (a.b … z)' = a' + b' + … z‘
  • 92. DeMorgan's Theorem  F = ab + c’d’  F’ = ??  F = ab + c’d’ + b’d  F’ = ??  Show that: (a + b.c)' = a'.b' + a'.c'
  • 93. More DeMorgan's example Show that: (a(b + z(x + a')))' =a' + b' (z' + x') Sol: (a(b + z(x + a')))' = a' + (b + z(x + a'))' = a' + b' (z(x + a'))' = a' + b' (z' + (x + a')') = a' + b' (z' + x'(a')') = a' + b' (z' + x'a) =a‘+b' z' + b'x'a =(a‘+ b'x'a) + b' z' =(a‘+ b'x‘)(a +a‘) + b' z' = a‘+ b'x‘+ b' z‘ = a' + b' (z' + x')
  • 94. More Examples (a(b + c) + a'b)'=b'(a' + c') ab + a'c + bc = ab + a'c (a + b)(a' + c)(b + c) = (a + b)(a' + c)