alice-teacher question regarding bits and bytes!

Paul Akuna at Franklin High PAkuna at egusd.net
Thu Mar 13 16:27:55 EDT 2014


Hi Sandy,
I think I have an answer. Looking at RGB (red, green blue) you would need at least 2 bits to represent each color, hence 6 bits. 2 bits represent 4 possible combinations (hue) of each color, therefore 4*4*4=64 possible colors.
The other question I believe comes from a different situation. A kilobyte is equal to 1024 bytes. Take 1024 bytes * 12 = 12,288 bytes (12KB). One byte is equal to 8 bits. Take 8 bits * 12,288 bytes = 98,304 bits.
Anyway that’s my take on this…
Paul Akuna

From: alice-teachers-bounces+pakuna=egusd.net at lists.andrew.cmu.edu [mailto:alice-teachers-bounces+pakuna=egusd.net at lists.andrew.cmu.edu] On Behalf Of Sandy Graham
Sent: Wednesday, March 12, 2014 6:11 PM
To: 'Alice educators'
Subject: Re: alice-teacher question regarding bits and bytes!

I have two students who have completed the entire Alice book. They did every definition, question and programming assignment in the book! We have moved onto a java book to prep them for the AP exam. Chapter 1 of that book has the following question:
“If a picture was made up of 64 possible colors, how many bits would be needed to store each pixel of the picture?”
I thought RGB values would be required so was trying to figure out an answer from that (though the book doesn’t give much information on how to do that exactly), but the answer key says the answer is 6. I can see that 2^6 = 64 and assume that’s where the 6 came from, but why is that the answer? How does 6 bits yield 64 possible colors? Don’t RGB values have to be considered?

Then the next question asks, “How many bits are there in 12 KB?”
So 12 * 2^10 = 12,288, right? I’m pretty con fident of my answer, but I wanted to double check with a reliable source as the answer key says 98, 304 is the correct answer. The key is wrong, right?

Thanks! I didn’t know where else I could get a reliable answer to this!
Your sister in Christ,

Sandy Graham

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20140313/d79f3570/attachment.html 


More information about the alice-teachers mailing list