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

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 04 EOT 05 ENQ 06 ACK 07 BEL 08 BS 09 HT 0A NL 0B VT 0C NP 0D CR 0E SO 0F SI 10 DLE 11 DC1 12 DC2 13 DC3 14 DC4 15 NAK 16 SYN 17 ETB 18 CAN 19 EM 1A SUB 1B ESC 1C FS
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern