Wednesday, February 9, 2011

lecture #4: a lot of math!

represent bigger numbers by combining bits

an introduction to binary
how to understand binary. this will entail converting binary to decimal.

how to convert decimal to binary. an easy way.

introducing octal numbers.
introducing hexadecimal numbers.

I give links and videos on the blog, so you can review how to do it.

decimal = base 10

google calculator

octal = base 8

3 bits = 8 possible values
0 = 000
1 = 001
2 = 010
3 = 011
4 = 100
5 = 101
6 = 110
7 = 111

to go from base 8 to base 10, use an intermediate base 2. use the lookup chart

to go from base 10 to base 8, use an intermediate base 2. use the lookup chart

4 bits = 16 possibilities = 2^4
0 = 0000
1 = 0001
2 = 0010
3 = 0011
4 = 0100
5 = 0101
6 = 0110
7 = 0111
8 = 1000
9 = 1001
10= 1010
11= 1011
12= 1100
13= 1101
14= 1110
15= 1111

base 16 = hexadecimal

0 = 0000
1 = 0001
2 = 0010
3 = 0011
4 = 0100
5 = 0101
6 = 0110
7 = 0111
8 = 1000
9 = 1001
A = 1010
B = 1011
C = 1100
D = 1101
E = 1110
F = 1111

4 comments:

  1. Hi Prof,
    Do we have to memorize the chart? Are you going to give those charts to us on the exam paper?
    Cindy Leung

    ReplyDelete
  2. no, not at this point, since you don't know how to add in binary by the cutoff point for this first quiz. *if* it is necessary (say, for a conversion), then I would provide the charts.

    ReplyDelete
  3. but i remember that you gave us some little homework which needed us to convert numbers into octal and hexiadecimal... does it mean that you are not going to give us the charts in the case of converting numbers?

    ReplyDelete
  4. for the homework, you would need to use the charts. if octal to and from binary or hex to and from binary appears on this upcoming quiz, i would provide a chart. eventually, i might expect you to be able to produce the chart yourself.

    ReplyDelete