Skip to content

Latest commit

 

History

History
22 lines (14 loc) · 1.33 KB

File metadata and controls

22 lines (14 loc) · 1.33 KB

Do not use any tools or programming to solve these problems. Work it out yourself by hand, and fill in the answers.

Do not convert any binary numbers to decimal when solving a question unless the question explicitly tells you to.

The goal of these exercises is for you to gain an intuition for binary numbers. Using tools to solve the problems defeats the point.

The answers to these questions will require a bit of explanation, not just a simple answer.

Q16: How can you test if a binary number is a power of two (e.g. 1, 2, 4, 8, 16, ...)? Answer:if there is only single 1 in the binary number then it is power of 2.

Q17: If reading the byte 0x21 as an ASCII character, what character would it mean? Answer:! (Looking at the ASCII text encoding Table)

Q18: If reading the byte 0x21 as a greyscale colour, as described in "Approaches for Representing Colors and Images", what colour would it mean? Answer: I need explanation for this and guid me how to calculate to guess the color.

Q19: If reading the bytes 0xAA00FF as a sequence of three one-byte decimal numbers, what decimal numbers would they be? Answer:170,0,255

Q20: If reading the bytes 0xAA00FF as an RGB colour, as described in "Approaches for Representing Colors and Images", what colour would it mean? Answer:I need explanation for this and guid me how to calculate to guess the color.