Date: Wed, 05 Mar 2003 22:41:53 -0600 (CST) From: Mark Jacobson To: 810-021-01@uni.edu Subject: QUIZ RESULTS FOR Greenlaw : Chapter 8 : Web Graphics : take by 3/12 Author Name : Greenlaw Site Name : Inline/Online Chapter : Chapter 8 : Web Graphics Quiz : Multiple Choice Quiz The purpose of this quiz is to provide the student with a large number of supplemental exercises for Chapter 8. This quiz can be used to perform a self-evaluation. This quiz consists of twenty five multiple choice questions. Take the Web Graphics quiz by Wednesday, March 12th, on or before 3/12. http://www.cns.uni.edu/~jacobson/c021.html ----------------------------------------------------------------------- We talked about Graphics today, including levels of color and the color depth of a bitmapped pixel. Number of colors: Pixel depth (Number of bits) 2 1 8 3 16 4 256 8 bits or 1 byte per pixel 16 million 24 bits or 3 bytes per pixel 1 byte for RED level (0 to 255) 1 byte for GREEN value 1 byte for BLUE amount Or you can think of 24 bit color as having 8 bits for red phosphor, 8 bits for green phosphor, and 8 bits for the blue phosphor. 3 24 With 24 bit color there are 256 or 2 possible colors. 10 2 = 1024 = 1K or about 1000 but called a kilobyte or 1K or 1 K. 20 2 2 2 = 1024K = 1024 or about 1000 = 1,000,000 but called a megabyte or 1M or 1 Meg. 21 22 23 2 = 2 Meg 2 = 4 Meg 2 = 8 Meg and, now you have it, 24 2 = 16 Meg, which is about 16 million, but is exactly 16 x 1024 x 1024, which is 16,777,216 Here is some output from the bc calculator on cowboy.cns.uni.edu to illustrate. * is multiply and ^ is raise to the power of so that 2^10 8 1,024 <---------- about 1,000 = 1K 2^8 means 2 2^20 or 2*2*2*2*2*2*2*2 1,048,576 <---------- about 1,000,000 = 1M 1024*1024 20 1,048,576 <---------- 1,024 squared is the same as 2 2^24 24 16,777,216 <---------- about 16 million, is exactly 16M = 2 Sixteen, by the way, is a very sweet number. For a fun mind-reading program based on number theory, go see the brand new 2nd link on my web page http://www.cns.uni.edu/~jacobson Mark