CS33-2

CS33-2 - CS 33: Computer Organization Topic 2 Computer...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 33: Computer Organization Topic 2: Computer Arithmetic 9/2008 John A. Rohr All Rights Reserved JAR 2-1 CS 33: Computer Organization Topic 2 Computer Arithmetic
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS 33: Computer Organization Topic 2: Computer Arithmetic 9/2008 John A. Rohr All Rights Reserved JAR 2-2 Characters Characters are represented by numerical values For example: A = 65; + = 43 Standard values must be used for exchange of information
Background image of page 2
CS 33: Computer Organization Topic 2: Computer Arithmetic 9/2008 John A. Rohr All Rights Reserved JAR 2-3 Standard Character Codes ASCII: American Standard Code for Information Interchange ANSI: American National Standards Institute: Extended ASCII EBCDIC: Extended Binary Coded Decimal Interchange Code Unicode: New 16-bit code: 65,536 characters
Background image of page 3

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

View Full DocumentRight Arrow Icon
CS 33: Computer Organization Topic 2: Computer Arithmetic 9/2008 John A. Rohr All Rights Reserved JAR 2-4 Data Cells Computers hold data in cells Computer data cells have a fixed size The size of the cell determines the number of values the cell can hold The size of a cell is specified as a number of bits Cell sizes are usually multiples of 8 bits
Background image of page 4
CS 33: Computer Organization Topic 2: Computer Arithmetic 9/2008 John A. Rohr All Rights Reserved JAR 2-5 Data Cell Size Byte 8 bits: 256 values Half-Word 16 bits: 65,536 values Word 32 bits: 4,294,967,296 values Double Word 64 bits: 18,446,744,073,709,551,616 values
Background image of page 5

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

View Full DocumentRight Arrow Icon
CS 33: Computer Organization Topic 2: Computer Arithmetic 9/2008 John A. Rohr All Rights Reserved JAR 2-6 Unsigned Addition: Decimal Add digit positions Start from the units position If the sum in a position is greater than 9, subtract 10 from the result and carry 1 to the next position The one carried to the new position is worth ten times its value in the previous position
Background image of page 6
CS 33: Computer Organization Topic 2: Computer Arithmetic 9/2008 John A. Rohr All Rights Reserved JAR 2-7 Unsigned Decimal Add Example 12345 10 • + 34567 10 46912 10 5 + 7 = 12 10 : Record 12 – 10 = 2, Carry 1 4 + 6 + 1 = 11 10 : Record 11 – 10 = 1, Carry 1 3 + 5 + 1 = 9 10 : Record 9, No Carry 2 + 4 = 6 10 : Record 6, No Carry 1 + 3 = 4 10 : Record 4, No Carry
Background image of page 7

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

View Full DocumentRight Arrow Icon
CS 33: Computer Organization Topic 2: Computer Arithmetic 9/2008 John A. Rohr All Rights Reserved JAR 2-8 Unsigned Addition: Octal Add digit positions Start from the units position If the sum in a position is greater than 7, subtract 8 from the result and carry 1 to the next position The one carried to the new position is worth eight times its value in the previous position
Background image of page 8
CS 33: Computer Organization Topic 2: Computer Arithmetic 9/2008 John A. Rohr All Rights Reserved JAR 2-9 Unsigned Octal Add Example 12345 8 • + 34567 8 47134 8 5 + 7 = 12 10 : Record 12 – 8 = 4, Carry 1 4 + 6 + 1 = 11 10 : Record 11 – 8 = 3, Carry 1 3 + 5 + 1 = 9 10 : Record 9 – 8 = 1, Carry 1 2 + 4 + 1 = 7 10 : Record 7, No Carry 1 + 3 = 4 10 : Record 4, No Carry
Background image of page 9

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

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 67

CS33-2 - CS 33: Computer Organization Topic 2 Computer...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online