Monday, September 27, 2010

what can we do (so far) with binary numbers?

* convert to, from decimal
* add 'em, subtract 'em
* represent negative nums

 101
 101
_____
1010

 11
 11
____
110

 11011
 11011
______
110110

multiplication by powers of 2 can be accomplished via bitshifting to the left

division by powers of 2 can be accomplished via bitshifting to the right

1010 becomes 101 becomes 10 becomes 1 becomes 0

letter A
how do we represent characters?
ASCII
http://www.asciitable.com/

ASCII uses 7 bits
total number of combination is 2 ^ number bits
2 ^ 7 = 128 possibilities

extended ascii

http://en.wikipedia.org/wiki/Extended_Binary_Coded_Decimal_Interchange_Code

http://en.wikipedia.org/wiki/Unicode

how do we encode pixels?
pixel = picture element
654 x 466 = 302764


web safe colors

RGB = red green blue
1 byte for each, total 3 bytes

BMP

what is a GIF? what is a JPEG?
compression


lossless compression
- run-length encoding
- GIF
lossy compression

2 comments:

  1. I AM STILL A LITTLE NERVOUS ABOUT CONVERTING ITS A LITTLE CONFUSING... ESPECIALLY ADDING AND SUBTRACTING IT MADE ME EXTREMELY CONFUSED

    ReplyDelete
  2. check out this website, which has a walkthrough and explanation:
    http://www.helpwithpcs.com/courses/adding-subtracting-binary-numbers.htm

    --josh

    ReplyDelete