# Conversion and Coding (12)10.

## Presentation on theme: "Conversion and Coding (12)10."— Presentation transcript:

Conversion and Coding (12)10

Conversion and Coding (12)10 1100 Conversion

Conversion and Coding (12)10 00010010 1100 Coding Conversion
(using BCD code for each digit) Conversion

BCD Adder Design a circuit that calculates the
Arithmetic addition of two decimal digits. 9 + 3 1 2 carry

BCD Adder Maximum sum is 9+9 + 1 = 19 Max digit
Carry from previous digits

BCD adder (sum up to 9) Number C S8 S4 S2 S1 1 2 3 4 5 6 7 8 9

BCD adder (sum up to 9) Number C S8 S4 S2 S1 1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9 The sum is the same with BCD adder

BCD adder (sum is 10 to 19) Number C S8 S4 S2 S1 10 1 11 12 13 14 15
11 12 13 14 15 16 17 18 19

BCD adder (sum is 10 to 19) C S8 S4 S2 S1 10 1 11 12 13 14 15 16 17 18
Binary sum Number C S8 S4 S2 S1 10 1 11 12 13 14 15 16 17 18 19 K Z8 Z4 Z2 Z1 1

BCD adder (sum is 10 to 19) C S8 S4 S2 S1 10 1 11 12 13 14 15 16 17 18
Binary sum Number C S8 S4 S2 S1 10 1 11 12 13 14 15 16 17 18 19 K Z8 Z4 Z2 Z1 1

BCD adder (sum is 10 to 19) +6 C S8 S4 S2 S1 10 1 11 12 13 14 15 16 17
Binary sum Number C S8 S4 S2 S1 10 1 11 12 13 14 15 16 17 18 19 K Z8 Z4 Z2 Z1 1 +6

If sum is up to 9 Use the regular Adder. If the sum > 9 Use the regular adder and add 6 to the result

When is the result > 9 K Z8 Z4 Z2 Z1 10 1 11 12 13 14 15 16 17 18
Binary sum Number K Z8 Z4 Z2 Z1 10 1 11 12 13 14 15 16 17 18 19 C = K +

When is the result > 9 K Z8 Z4 Z2 Z1 10 1 11 12 13 14 15 16 17 18
Binary sum Number K Z8 Z4 Z2 Z1 10 1 11 12 13 14 15 16 17 18 19 C = K + Z8*Z4+

When is the result > 9 K Z8 Z4 Z2 Z1 10 1 11 12 13 14 15 16 17 18
Binary sum Number K Z8 Z4 Z2 Z1 10 1 11 12 13 14 15 16 17 18 19 C = K + Z8*Z4+ Z8*Z2