Computer Science 1033A/B Lecture Notes - Lecture 3: Binary System, Pixel, Dont
COMPSCI 1033A/B verified notes
3/12View all
Document Summary
Programmers have figured out how to convert our world that our computers can understand: words, images, sound, movies to binary. Question: how about an 8 bit number (8 bits is called a byte) Each digit must be converted individually and then the digits are added together. If the digit is a 0, ignore it! If the digit is a 1, get the place value of the digit and calculate 2 to the power of that place value. Note that the place values always begin with the right-most digit at place 0. E. g1. we want to convert 1001 to decimal. The small, red numbers (cid:271)elo(cid:449) represe(cid:374)t ea(cid:272)h digit"s pla(cid:272)e (cid:448)alue. No(cid:449) (cid:449)e raise (cid:1006) to the po(cid:449)er of the pla(cid:272)e (cid:448)alue for ea(cid:272)h of the (cid:1005)"s. The first 1 has place value 3, so take 23 = 8. The next 1 has place value 0, so take 20 = 1. The three 1s are at place values 2, 1, and 0.