Lec 2
Lec 2
Digital Design
Lecture#2
1’s Complement of a
Binary Number:
There is a simple algorithm to convert a binary number into 1’s complement. To get
1’s complement of a binary number, simply invert the given number. You can
simply implement logic circuit using only NOT gate for each bit of Binary number
input. Implementation of logic circuit of 4-bit 1’s complement is given as following
below.
Example-1: Find 1’s complement of binary number 10101110.
Simply invert each bit of given binary number, so 1’s complement of given number will
be 01010001.
Example-2: Find 1’s complement of binary number 10001.001.
Simply invert each bit of given binary number, so 1’s complement of given number will
be 01110.110.
Example-3: Find 1’s complement of each 3 bit binary number.
Simply invert each bit of given binary number, so 1’s complement of each 3 bit binary
number will be,
Nine’s complement
Answer???
1
Ten’s complement
72532-3250
3
6 Binary Coded Decimal
and Excess three codes
Decimal BCD Excess-3
0 0000 0011
1 0001 0100
2 0010 0101
3 0011 0110
4 0100 0111
5 0101 1000
6 0110 1001
7 0111 1010
8 1000 1011
9 1001 1100
7 EVEN Vs ODD Parity
A parity is an error coding method to find errors in digital
data. A parity bit is an extra bit which is added in binary
message to make total number of 1's either even or odd.
While reading or receiving the data parity check is made
to find the errors in data. It is used for error detection in
the original data at the receiver side and correcting the
data. Parity word denotes the number of 1's in binary
string. There are two parity systems: even or odd.
Even parity and odd parity are two methods which are
used in data transmission to ensure the integrity of
transmitted data. Both methods involve adding an extra
bit to the data being transmitted, which is called parity
bit, which is used for error detection.
Even Parity Check?
🠶 Closure
🠶 Commutative
Law
🠶 Identity
Element
🠶 Inverse
🠶 Distributive
Law
Commutative
Law
🠶 Commutative Law for
Addition A + B = B + A