**Refresher:**

Binary-coded decimal (BCD) is a class of **binary encodings** of decimal numbers.

Eg: 1001 in BCD representation represents decimal no. 9

1001 1001 in BCD representation represents decimal no. 99 and so on.

**Doubt Clarification:**

//Note: I/P is in BCD, Output is in Binary.

1 digit BCD input, binary output:

Max possible I/p: 1001 (9) O/P: = 1001 (9)

Input lines eqd. = 4

Output lines reqd. = 4

2 digit BCD input, binary output:

Max possible I/p: 1001 1001 (99) O/P: 1100011(99)

Input lines reqd. = 8 //count the no. of input bits

Output lines reqd. = 7 // ceil (log 99) = ceil (6.6293) = 7

//**or** simply count the no. of output bits

3 digit BCD input, binary output:

Max possible I/p: 1001 1001 1001 (999) O/P: 1111100111(999)

Input lines eqd. = 12

Output lines reqd. = 10 // ceil (log 999) = ceil (9.964) = 10

4 digit BCD input, binary output:

Max possible I/p: 1001 1001 1001 1001 (9999) O/P: 10011100001111(9999)

Input lines eqd. = 16

Output lines reqd. = 14 // ceil (log 9999) = ceil (13.28) = 14

**Hence, Size of ROM with 16 input lines and 14 output lines is: 2^16 * 14 bits**