# tutorial2 - ERG2020A Tutorial 2 Number System (cont)...

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

ERG2020A Tutorial 2 Number System (cont) Computer Code Boolean Algebra

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

View Full Document
Positive Numbers – Addition and Subtraction
Positive Numbers – Multiplication

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

View Full Document
Positive Numbers – Division
2’s Complement – Addition (+5) (+1) + (+6) 0101 0001 + 0110 (+5) (-1) + (+4) 0101 1111 + 0100 1 (-5) (+1) + (-4) 1011 0001 + 1100 (-5) (-1) + (-6) 1011 1111 + 1010 1

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

View Full Document
2’s Complement – Subtraction (+5) (-1) + (+4) 0101 0001 + 0110 (+5) (+1) + (+6) 0101 1111 + 0100 1 (-5) (-1) + (-6) 1011 0001 + 1100 (-5) (+1) + (-4) 1011 1111 + 1010 1 (+5) (+1) - (+4) (+5) (-1) - (+6) (-5) (+1) - (-6) (-5) (-1) - (-4) The carry is discarded
1’s Complement Arithmetic 1010 1110 + 1000 1 (-5) (+1) - (-6) (-5) (+1) - (-6) 1 1001 Carry added in

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

View Full Document
Computer Code Systematic use of a given set of symbols for representing information BCD ASCII Gray code Error-detection code Hamming code
BCD Binary Coded Decimal - use 4 bits to represent decimal digits 0 – 9 0: 0000 5: 0101 1: 0001 6: 0110 2: 0010 7: 0111 3: 0011 8: 1000 4. 0100 9: 1001

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

View Full Document
BCD Addition: eg1: 4 + 3 = 0100 + 0011 = 0111 eg2: 4 + 7 = 0100 + 0111 = 1011 (>1001, overflow) - to correctly represent this number, add 0110 1011 + 0110 = 00010001 (this is 11 in BCD, not 17!)
ASCII American Standard Code for Information Interchange - use 7 bits to represent 128 characters Extended ASCII - use 8 bits to represent 256 characters (more graphical characters) Unicode - use 16 bits to represent 65536 characters (universal)

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

View Full Document
ASCII table (hex) 00 NUL 01 SOH 02 STX 03 ETX
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 05/18/2010 for the course ENGINEERIN ERG2020A taught by Professor Leekinhong during the Spring '07 term at CUHK.

### Page1 / 29

tutorial2 - ERG2020A Tutorial 2 Number System (cont)...

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

View Full Document
Ask a homework question - tutors are online