DCF-Module1 points only
DCF-Module1 points only
2. BINARY TO DECIMAL
1. DECIMAL TO BINARY Convert Binary number 11011.101 to
decimal
Convert Decimal (98.46) to Binary
Ans: 1100010.01110 …
Ans:27.625
3. DECIMAL TO OCTAL
4. OCTAL TO DECIMAL
5. DECIMAL TO HEXADECIMAL
6. HEXADECIMAL TO DECIMAL
1. BINARY TO HEXADECIMAL
1. HEXADECIMAL TO BINARY
M>N Determine 1’s compliment of ‘ N’ Add Determine 2’s compliment of ‘ N’ Add this to M
this to M Ingnore Carry
Add carry to the result Eg: Find 1111-1010M=1111 ,
Result= 1’sCompliment(N)+M+ Carry N=1010
1111+
2’s Compliment0 1 1 0
1 0101
Ignore Carry 1
Result: 0 1 0 1
M<N Determine 1’s compliment of ‘N’ Add this to M Determine 2’s compliment of ‘N’ Add this to M
Find 1’s compliment of result\Put -ve sign in the Find ’2s compliment of result
result Put -ve sign in the result
Eg: Find 1010 - 1111 Eg: Find 1010 -1111
M=1 0 1 0 , N=1 1 1 1 M=1 0 1 0 , N=1 1 1 1
1010+ 1010+
1’s Compliment0 0 0 0 2’s Compliment 0001
1010 1011
1’s Compliment (1 0 1 0) 0 1 0 1 2’s Compliment (1011) 0 1 0 1
Put -ve Sign -0101 Put -ve Sign -0101
BINARY CODES BCD and its ADDITION
BCD or binary-coded decimal is a each
Process of converting into binary is individual digit of a number is converted into a
binary number, and then by combining them all,
called coding
the BCD code is generated.
Codes are classified into 2 groups.
Weighted Codes DECIMAL BCD
Exhibit a specific weights assignedto the bit 8 4 2 1
position (weights)
eg– BCD, 2421, 5211 0 0000
Unweighted Codes 1 0001
Exhibit no specific weights 2 0010
assigned to the bit position Eg—Excess 3 3 0011
code , Gray code 4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
10 0001 0000
11 0001 0001
Step 1: Add the two BCD numbers using the rules for binary addition.
Step 2: If a 4-bit sum is equal to or less than 9, it is a valid BCD number.
Step 3: If a 4-bit sum is greater than 9 or if a carry-out of the 4-bit group is generated, it is an
invalid result.
Add 6 (0110) to the 4-bit sum in order to skip the six invalid BCD code words and return the code
to 8421.
If a carry results when 6 is added, simply add the carry to the next 4-bit group.
Example:The BCD or binary-coded decimal of the number 15 is 00010101. The 0001 is the
binary code of 1 and 0101 is the binary code of 5.
Hamming code is a set of error-correction codes that can be used to detectand correct the errors
It is a technique developed by R.W. Hamming for error correction
It is a 7 bit code in which 4 data bits can be transmitted
This code contains 4 data bits (D3, D5, D6, D7) and 3 parity bits (P4, P2,P1)
D7 D6 D5 P4 D3 P2 P1
Parity checking at the receiver can detect the presence of an error if theparity of
the receiver signal is different from the expected parity.
That means, if it is known that the parity of the transmitted signal is always
going to be "even" and if the received signal has an odd parity , then the receiver
can conclude that the received signal is not correct.
If an error is detected, then the receiver will ignore the received byte and request
for retransmission of the same byte to the transmitter.