218L3S09

# 218L3S09 - ESE218 Lecture 3 Binary codes Decimal codes Gray...

This preview shows pages 1–6. Sign up to view the full content.

2/3/09 ESE218 Spring 2009 Lecture 3 1 Outline ± Decimal codes ² Binary-coded decimals (BCD) ² Addition of BCD ² BCD with sign ² Self-complementing codes ² Excess-3 ² 2421 ± Gray code ± Codes for serial transmission ± Summary ESE218 Lecture 3 Binary codes: Decimal codes. Gray code. Codes for serial transmission.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2/3/09 ESE218 Spring 2009 Lecture 3 2 Binary coded decimals 0101 5 0100 4 0011 3 1000 8 0111 7 0110 6 0000 0 BCD Digits 0010 2 - 9 1 6 unused codes 1001 0001 17 10 = 0001 0111 BCD 25 10 = 0010 0101 BCD + 0011 1100 11 carry Result of a bit-by-bit addition is not a BCD number 0110 = +6 if sum > 9 + 0011 0010 1 1 carry 42 10 = 0100 0010 BCD Weighted code
2/3/09 ESE218 Spring 2009 Lecture 3 3 BCD clock What time is it?

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2/3/09 ESE218 Spring 2009 Lecture 3 4 Negative BCD numbers 0101 5 0100 4 0011 3 1000 8 0111 7 0110 6 0000 0 BCD Digits 0010 2 - 9 1 6 unused codes 1001 0001 00 = 0 0000 0000 01 = +1 0000 0001 02 = +2 0000 0010 .. 97 = -3 1001 0111 98 = -2 1001 1000 99 = -1 1001 1001 +2 0000 0010 -1 1001 1001 1011 1 0110 0110 <- add 6 +1 1 0000 0001 carry discarded + + Presented as 10’s complements <- not a BCD <- add 6
2/3/09 ESE218 Spring 2009 Lecture 3 5 9’s and 10’s complements 000 001 002 003 999 998 997 996 001 002 003 999 998 997 996 10’s complement = 1 + 9’s complement 3-digit decimal numbers with sign: -100…+ 99 -1 -2 -3 -4 +1 +2 +3 +1 099 900 900 099 000 Two zeros Digital systems obtain 10’s complements from 9’s complements because…

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 14

218L3S09 - ESE218 Lecture 3 Binary codes Decimal codes Gray...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online