CS33-1

CS33-1 - CS 33: Computer Organization Topic 1 Number Bases...

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

CS 33: Computer Organization Topic 1: Number Bases 9/2008 John A. Rohr All Rights Reserved JAR 1-1 CS 33: Computer Organization Topic 1 Number Bases

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

View Full Document
CS 33: Computer Organization Topic 1: Number Bases 9/2008 John A. Rohr All Rights Reserved JAR 1-2 Number Bases Base Name Base Number Digits
CS 33: Computer Organization Topic 1: Number Bases 9/2008 John A. Rohr All Rights Reserved JAR 1-3 Number Bases Base Name Base Number Digits Decimal 10 0 - 9

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

View Full Document
CS 33: Computer Organization Topic 1: Number Bases 9/2008 John A. Rohr All Rights Reserved JAR 1-4 Decimal Numbers Base 10 Digits 0 – 9 Digit positions are powers of 10 10 3 10 2 10 1 10 0 1 2 3 4 1234 = 4 * 10 ^ 0 = 4 + 3 * 10 ^ 1 = 30 + 2 * 10 ^ 2 = 200 + 1 * 10 ^ 3 = 1,000 1,234
CS 33: Computer Organization Topic 1: Number Bases 9/2008 John A. Rohr All Rights Reserved JAR 1-5 Conversion to Decimal Assume Base b: Digits are 0 to b - 1 Digit positions are powers of b Multiply each digit by power of b and add products Example: d 3 d 2 d 1 d 0 Powers of b: b 3 b 2 b 1 b 0 Base b digits: d 3 d 2 d 1 d 0 d 3 d 2 d 1 d 0 = d 0 * b ^ 0 + d 1 * b ^ 1 + d 2 * b ^ 2 + d 3 * b ^ 3

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

View Full Document
CS 33: Computer Organization Topic 1: Number Bases 9/2008 John A. Rohr All Rights Reserved JAR 1-6 Octal Numbers Base 8 Digits 0 – 7 Digit positions are powers of 8 8 3 8 2 8 1 8 0 1 2 3 4 1234 8 = 4 * 8 ^ 0 = 4 10 + 3 * 8 ^ 1 = 24 10 + 2 * 8 ^ 2 = 128 10 + 1 * 8 ^ 3 = 512 10 668 10
CS 33: Computer Organization Topic 1: Number Bases 9/2008 John A. Rohr All Rights Reserved JAR 1-7 Number Bases Base Name Base Number Digits Decimal 10 0 - 9 Octal 8 0 - 7

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

View Full Document
CS 33: Computer Organization Topic 1: Number Bases 9/2008 John A. Rohr All Rights Reserved JAR 1-8 Octal Number Practice • Convert 12345 8 to decimal
CS 33: Computer Organization Topic 1: Number Bases 9/2008 John A. Rohr All Rights Reserved JAR 1-9 Octal Number Practice • Convert 12345 8 to decimal Use powers of 8 8 4 8 3 8 2 8 1 8 0 1 2 3 4 5 12345 8 = 5 * 8 ^ 0 = 5 10 + 4 * 8 ^ 1 = 32 10 + 3 * 8 ^ 2 = 192 10 + 2 * 8 ^ 3 = 1,024 10 + 1 * 8 ^ 4 = 4,096 10 5,349 10

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

View Full Document
CS 33: Computer Organization Topic 1: Number Bases 9/2008 John A. Rohr All Rights Reserved JAR 1-10 Binary Numbers Base 2 Digits 0 and 1 Digit positions are powers of 2 2 3 2 2 2 1 2 0 1 0 1 1 1011 2 = 1 * 2 ^ 0 = 1 10 + 1 * 2 ^ 1 = 2 10 + 0 * 2 ^ 2 = 0 10 + 1 * 2 ^ 3 = 8 10 11 10
CS 33: Computer Organization Topic 1: Number Bases 9/2008 John A. Rohr All Rights Reserved JAR 1-11 Number Bases Base Name Base Number Digits Decimal 10 0 - 9 Octal 8 0 - 7 Binary 2 0, 1

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

View Full Document
CS 33: Computer Organization Topic 1: Number Bases 9/2008 John A. Rohr All Rights Reserved JAR 1-12 Binary Number Practice • Convert 110100101 2 to decimal
CS 33: Computer Organization Topic 1: Number Bases 9/2008 John A. Rohr All Rights Reserved JAR 1-13 Binary Number Practice • Convert 110100101 2 to decimal Use powers of 2 for nonzero digits

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.

CS33-1 - CS 33: Computer Organization Topic 1 Number Bases...

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

View Full Document
Ask a homework question - tutors are online