Adriano, Charles Joseph C.
CPE501
LCD 05 Task Performance 1 – ARG
1. Based on your perspective, briefly discuss the structure of the different types of binary codes.
(Essay: 10 points)
Weighted Codes - Weighted codes follow the position weighting principle,
which stipulates that each number's location has a given weight. Each decimal
digit is represented by a group of four bits in these codes. Each digit in a
weighted code is allocated a certain weight based on its position. For example,
the weights of 1, 1, 0, and 1 (from left to right) are 8, 4, 2 and 1 in 8421/BCD
code 1001.
The 8421 code is a weighted code that uses a four-bit code
word to represent each decimal number from 0 to 9. Weights of 8, 4, 2, and 1
are allocated to the bit locations in each code word, from left to right. Excess-3
code, biquinary code, and binary-coded decimal are other terms for the same
thing.
The BCD number 2421 is related to the code 8421. A weighted
approach is used to represent a decimal number. In the MSB, the approaches
are different.
For example, 0100 is used to symbolize 4 since 0*2+1*4+0*2+0*1=4. Because
1*2+0*4+1*2+1*1=5, you will write 1011 to represent 5. It's worth noting that
they're negations of each other. This is critical to remember in order to avoid
duplicate values.
For example, you may write 5 as 1011 or 0101, but the latter is incorrect since it
is not a negation of 4. Another example is 6, which may be expressed as either
1100 or 0110, but only the first is the negative of 3 (0011). To get their mirror
companions 5–9, write the first five digits 0–4 as usual BCD and negate them.
4–5
3–6
2–7
1–8
0–9
CPE501
LCD 05 Task Performance 1 – ARG
1. Based on your perspective, briefly discuss the structure of the different types of binary codes.
(Essay: 10 points)
Weighted Codes - Weighted codes follow the position weighting principle,
which stipulates that each number's location has a given weight. Each decimal
digit is represented by a group of four bits in these codes. Each digit in a
weighted code is allocated a certain weight based on its position. For example,
the weights of 1, 1, 0, and 1 (from left to right) are 8, 4, 2 and 1 in 8421/BCD
code 1001.
The 8421 code is a weighted code that uses a four-bit code
word to represent each decimal number from 0 to 9. Weights of 8, 4, 2, and 1
are allocated to the bit locations in each code word, from left to right. Excess-3
code, biquinary code, and binary-coded decimal are other terms for the same
thing.
The BCD number 2421 is related to the code 8421. A weighted
approach is used to represent a decimal number. In the MSB, the approaches
are different.
For example, 0100 is used to symbolize 4 since 0*2+1*4+0*2+0*1=4. Because
1*2+0*4+1*2+1*1=5, you will write 1011 to represent 5. It's worth noting that
they're negations of each other. This is critical to remember in order to avoid
duplicate values.
For example, you may write 5 as 1011 or 0101, but the latter is incorrect since it
is not a negation of 4. Another example is 6, which may be expressed as either
1100 or 0110, but only the first is the negative of 3 (0011). To get their mirror
companions 5–9, write the first five digits 0–4 as usual BCD and negate them.
4–5
3–6
2–7
1–8
0–9