Class1 DEMP
Class1 DEMP
Class1 DEMP
Pilani Campus
DS Rao
DEMP Lecture-1
Start the recording
Where: N = a number
B = base or radix of the number system
n = no.of digits in integer portion
m = no.of digits in fractional portion
dn-1 = Most Significant Digit (MSD)
d-m = Least Significant Digit(LSD)
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Number System
The digits in a number are placed side by side and each position in number is
assigned a weight or index of importance by some predesigned rule.
0 ≤ (di or d-f )≤ b-1
N = an-1bn-1+……+a0b0+….+a-mb-m 𝑁 = 𝑛−1
𝑖=−𝑚 𝑎𝑖 𝑏
𝑖
2710= 110112
Integer Fraction Coefficient
.315 x 2 = 0 + .630 a-1= 0
.630 x 2 = 1 + .26 a-2 = 1
.26 x 2 = 0 + .52 a-3 = 0
.52 x 2 = 1 + .04 a-4 = 1
.31510 = .01012
27.315 = 11011.01012
1000 100 10 1
3 1 2 6
3 x 1000 +
1 x 100 +
2 x 10 +
6 x 1 = 3126
Flexibility of representation
Information Types
▪ Numeric
– Must represent range of data needed
– Very desirable to represent data such that simple
straightforward computation for common arithmetic operations
permitted
– Tight relation to binary numbers
▪ Non-numeric
– Greater flexibility since arithmetic operations not applied.
– Not tied to binary numbers
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Conversion of Binary number to Gray Code:
Step2: The second bit of the gray code equals the Exclusive-OR
of the first and second bit of the binary number i.e., it will be 1 if
these binary code bits are different and 0 if they are same.
Step3: The third gray code bit equals the Exclusive-OR of the
second and third bits of the binary number and so on.
Step1:The first binary bit (MSB) is the same as that of the first
Gray Code Bit
Step2: If the second gray bit is 0 the second binary bit is the same
as that of the first binary
If the second gray bit is 1 the second binary bit is the
reverse as that of its first binary
1 0 1 0
1 1 1 1
1 0 1 0
Terminology:
▪Literal: A variable or its complement :
▪Eg x or x’
▪Product term: literals connected by (·)
▪ a.b.c
▪Sum term: literals connected by (+)
▪(a+b+c)
1. Closure (+ and‧)
2. The identity elements
(1) + = 0
(2) · = 1
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Postulates of Two-Valued Boolean Algebra
5. Complement
▪ x+x'=1 → 0+0'=0+1=1; 1+1'=1+0=1
▪ x.x'=0 → 0.0'=0.1=0; 1.1'=1.0=0
6. Has two distinct elements 1 and 0, with 0 ≠ 1
Note
▪ A set of two elements
▪ (+) : OR operation; (·) : AND operation
▪ A complement operator: NOT operation
▪ Binary logic is a two-valued Boolean algebra
x y xy x+xy
0 0 0 0
0 1 0 0
1 0 0 1
1 1 1 1
0 0 1 1 0 1 1 0 1 1
0 1 1 0 1 0 0 0 1 1
1 0 0 1 1 0 0 0 1 1
1 1 0 0 1 0 0 1 0 0
37
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Stop recording and then only end the class
Thanks