0 index
1 Last time
2 Other numbering systems
3 Octal
4 ASCII
5 Converting to Base 8
6 Hexadecimal – base 16
7 Other Numbers
8 Twos Compliment
9 Floating Point /1
10 Floating Point/2
11 Example

outline
created using slideshow.cgi by Andy Harris















CSCI N301 Fundamental CS Concepts: n301/cs04othernumbers
1. Last time
  • We converted from Decimal to Binary, Binary to Decimal



































CSCI N301 Fundamental CS Concepts: n301/cs04othernumbers
2. Other numbering systems
  • Octal – base 8
  • Hexadecimal – base 16



































CSCI N301 Fundamental CS Concepts: n301/cs04othernumbers
3. Octal
  • How this relates to computers
    - byte is a eight-bit binary number
  • It takes exactly one byte to specify one character is ASCII (American Standard Code for Information Interchange)



































CSCI N301 Fundamental CS Concepts: n301/cs04othernumbers
4. ASCII
  • What is it?
    - each character on a computer is assigned a unique binary code number
  • The computers use a code called ASCII, in which an eight-bit binary number represents each character – thus one byte (2^8 or 256)



































CSCI N301 Fundamental CS Concepts: n301/cs04othernumbers
5. Converting to Base 8
  • Break it into binary
  • base 10 32 16 8     4 2 1
    base 2  1 0 1     1 1 0
    base 8    5         6  



































CSCI N301 Fundamental CS Concepts: n301/cs04othernumbers
6. Hexadecimal – base 16
  • Uses for hexadecimal – colors
  • Values – 0 - F



































CSCI N301 Fundamental CS Concepts: n301/cs04othernumbers
7. Other Numbers
  • Twos Compliment
  • Floating Point



































CSCI N301 Fundamental CS Concepts: n301/cs04othernumbers
8. Twos Compliment
  • In decimal notation, a negative number is preceded by a ‘-‘ (minus sign)
  • This is not possible in binary, so we declare one bit to be a sign bit and the rest of the number to be the quantity
  • The complement of a number in a given base can be defined as the difference between each digit of the number and the maximum digit value for the base.
  • Example: Base 10
    number is 26 compliment is 73 which is 9-2 = 7 and 9-6 = 3 or the compliment of 73



































CSCI N301 Fundamental CS Concepts: n301/cs04othernumbers
9. Floating Point /1
  • If x is any real number, its normal form representation is,
    x = f * 10E
  • Example:
    125.32 = 0.12532 * 103
    -125.32 = -0.12532 * 103
    0.65 = 0.65 * 100



































CSCI N301 Fundamental CS Concepts: n301/cs04othernumbers
10. Floating Point/2
  • The number f of the representation is called the mantissa and the E is the exponent



































CSCI N301 Fundamental CS Concepts: n301/cs04othernumbers
11. Example
  • sign
    of
    mantissa
    sign
    of
    exponent
    d1d2d3d4d5d6d7d8
    digits
    of
    mantissa
    digits
    of
    exponent



































outline

Last time

Other numbering systems

Octal

ASCII

Converting to Base 8

Hexadecimal – base 16

Other Numbers

Twos Compliment

Floating Point /1

Floating Point/2

Example