top of page
Search

Encoding a Binary Rainbow

  • Elijah Moore
  • Sep 23, 2021
  • 2 min read

This summer I took some time and made my first YouTube video. In in I introduce the concept of different number systems and teach a way count up to 1023 on your hands using the number system we call binary. There's even a bonus poem at the end.



This video project was not my first project related to binary. Computers encode everything they use and do into bits of information that get represented as binary numbers. Every pixel on your screen is really comprised of 3 tiny lights, one red, one green, and one green. By combining varying intensities of red, blue and green, the pixel can convince our brains to see any color. Each pixel is told how intense the red, blue and green light should be on a scale of 0 to 255.


As we learned in my video, it takes 8 digits to count up to 255 in binary so each pixel color is described but a 24 digit binary number. 3 sets of 8 digits where the left most 8 digits represent the intensity of red, the middle 8 green, and the right 8 blue. Typically you read these color codes in what is called hexadecimal which is base 16 but these can be easily converted back and forth to binary. I don't remember how I got to this thought, but I came up with what I thought would be a cool idea. Make a rainbow, but represent the colors with a mono chromatic binary representation. Let me break down what I mean.


A rainbow is 7 bands of color stacked on top of each other. We can represent these color by their code which is 24 digits long so I made a template of an "empty" rainbow splitting each band into 24 sections.




Then for each band we can "write" the binary code that represents its color by filling in the section to represent a 1 or leave it blank to represent a 0.




Now that we've encoded our color into the frame work we can drop the template and were left with kind of an abstract black and white rainbow.




I've been diving back into my creative side lately and have many ideas for future posts. My next article will be about something similar but will use trinary to encode words into something I hope looks pretty cool.

 
 
 

Recent Posts

See All
Taking on a Difficult Challenge

When I first went to college I got an Associate's Degree in Computer Science, but after transferring as a Math major those skills were...

 
 
 

Comments


Post: Blog2_Post
bottom of page