This document contains information about binary number conversion between binary, decimal, and octal number systems using positional notation. It discusses how to convert a binary number to decimal and vice versa by summing the place values of bits. It also describes how to convert a binary number to octal by first converting to decimal and then to octal. The document provides examples and step-by-step workings for these conversions. It further discusses binary subtraction in 1's and 2's complement forms and simplifying Boolean expressions.
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
Akash Saha CSE 33 ADEpptx.pptx
1. GOVERNMENT COLLEGE OF ENGINEERING
& LEATHER TECHNOLOGY
NAME – AKASH SAHA
ROLL NO. – 11200121033
STREAM – COMPUTER SCIENCE & ENGINEERING
SUBJECT – ANALOG AND DIGITAL ELECTRONICS
CODE – ESC301
SEMESTER – 3RD SEMESTER
ACADEMIC YEAR – 2022-23
2. BINARY NUMBER TO DECIMAL NUMBER
Using Positional Notation
Since number numbers are type of positional number system. That means weight of
the positions from right to left are as 20, 21, 22, 23... and so on for the integer part and
weight of the positions from left to right are as 2-1, 2-2, 2-3, 2-4... and so on for the
fractional part.
Assume any unsigned binary number is bnb(n-1) ... b1b0.b-1b-2 ... b(m-1)bm. Then the
decimal number is equal to the sum of binary digits (bn) times their power of 2 (2n), i.e.,
bnb(n-1) ... b1b0.b-1b-2 ... b(m-1)bm = bnx2n+b(n-1)x2(n-1)+ ... +b1x21+bx020+b-1x2-1+b-22-2+ ...
EXAMPLE
11101.11 → 1x24 + 1x23 + 1x22 + 0x21 + 1x20 + 1x2-1 + 1x2-2 = 29.75
(101.11)2 = (29.75)10
3. DECIMAL NUMBER TO BINARY NUMBER
Consider the integer and fractional parts separately.
For the integer part:
1) Repeatedly divide the given number by 2, and go on accumulating the
remainders, until the number becomes zero.
2) Arrange the remainders in reverse order.
EXAMPLE
(13)10 = (1101)2
Base Num Rem
2 13
2 6 1
2 3 0
2 1 1
0 1
4. For the fractional part:
1) Repeatedly multiply the given fraction by 2.
• Accumulate the integer part (0 or 1).
• If the integer part is 1, chop it off.
2) Arrange the integer parts in the order they are obtained.
EXAMPLE
(.0625)10 = (.0001)2
∴ (13.0625)10 = (1101.0001)2
.0625 x 2 = 0.125
.1250 x 2 = 0.250
.2500 x 2 = 0.500
.5000 x 2 = 1.000
5. BINARY NUMBER TO OCTAL NUMBER
We cannot convert binary to octal directly. First we have to convert binary to decimal
and then decimal to octal.
EXAMPLE
(11101.11)2 = (???)8
We know from previous example that (11101.11)2 = (29.75)10.
Now we will convert (29.75)10 to octal.
Consider the integer and fractional parts separately.
For the integer part:
1) Repeatedly divide the given number by 8, and go on accumulating the
remainders, until the number becomes zero.
2) Arrange the remainders in reverse order.
6. Base Num Rem
8 29
8 3 5
0 3
For the fractional part:
1) Repeatedly multiply the given fraction by 8.
• Accumulate the integer part (0 to 7).
• If the decimal part is 0, chop it off.
2) Arrange the integer parts in the order they are obtained.
(29)10 = (35)8
(0.75)10 = (0.6)8 .75 x 8 = 6.0
∴ (11101.11)2 = (35.6)8
7. BINARY SUBTRACTION IN 1’S COMPLEMENT FORM
EXAMPLE 1 : (7)10 – (4)10 = 7 + (-4)
Binary of 7 = 0111, Binary of 4 = 0100
1’s complement of 4 = 1011
7 :: 0111 A
-4 :: 1011 B1
Cy 10010 R
+ 1
0011 → +3
EXAMPLE 2 : (4)10 – (5)10 = 4 + (-5)
Binary of 4 = 0100, Binary of 5 = 0101
1’s complement of 5 = 1010
4 :: 0100 A
-5 :: 1010 B1
1110 R → -1
Assume 4-bit representations
Since there is a carry, it is added back
to the result
The result is positive
Assume 4-bit representations
Since there is no carry, the result
is negative
1110 is the 1’s complement of
0001, that is, it represents –1
8. BINARY SUBTRACTION IN 2’S COMPLEMENT FORM
EXAMPLE 1 : (7)10 – (4)10 = 7 + (-4)
Binary of 7 = 0111, Binary of 4 = 0100
2’s complement of 4 = 1011 + 1 = 1100
7 :: 0111 A
-4 :: 1100 B2
10011 R → +3
Ignore carry
EXAMPLE 2 : (4)10 – (5)10 = 4 + (-5)
Binary of 4 = 0100, Binary of 5 = 0101
2’s complement of 5 = 1010 + 1 = 1011
4 :: 0100 A
-5 :: 1011 B2
1111 R → -1
Assume 4-bit representations
Presence of carry indicates that the
result is positive
No need to add the end-around carry
like in 1’s complement
Assume 4-bit representations
Since there is no carry, the result
is negative
1111 is the 2’s complement of
0001, that is, it represents –1
9. CONVERT SOP FORM INTO SSOP FORM
1. Multiply each non-standard product term by the sum of its missing variable and its
complement.
2. Repeat step 1, until all resulting product terms contain all variables.
3. For each missing variable in the function, the number of product terms doubles.
EXAMPLE
F(A,B,C) = AB’ + A’BC + B’C’ ------------Convert this SOP into SSOP form
= AB’(C+C’) + A’BC + (A+A’)B’C’
= AB’C + AB’C’ + A’BC + AB’C’ + A’B’C’
= AB’C + AB’C’ + A’BC + A’B’C’ --------This is the SSOP form