B CUSP 110C – Digital Thinking Homework 4: Colors and Binary Numbers

Colors And Binary Numbers

Goals: Reading color representations and Practice with Binary/Decimal number representations

Gray

## Which of the following color representation best describe the above colors?

1.      (180, 40, 40)

2.      (40, 180, 40)

3.      (40, 40, 180)

4.      (0, 0, 0)

5.      (180, 180, 180)

6.      (30, 30, 30)

7.      (255, 255, 255): White

## Part 2: Decimal and Binary representations

A.    Convert decimal 125 to binary:

 Num Being Converted 125 Place Value 256 128 64 32 16 8 4 2 1 Subtract Binary Num

B.     Convert decimal 387 to binary

 Num Being Converted 387 Place Value 256 128 64 32 16 8 4 2 1 Subtract Binary Num

C.     In class we have seen that 11012 (read: 1101-base2) has a decimal value of 13. What is the decimal value of

a.       10012

b.      1001012

c.       11011012

D.    What are the sums for the following binary numbers (hint: convert to decimal to verify your answers), express your answers in binary.

a.       10012 + 10012

b.      10012 + 1001012

c.       1001012 + 11011012

## Wrap Up

In this homework assignment you have practice reading (RGB) color representation in both floating point and integer. You have also practiced decimal to binary conversion and performing addition with binary numbers.