Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

09/08/2015

Binary Data
In a circuit ( called atransistor) there is a voltage across the
resistor, or there isnt
Lights
o Each light has an associated binary place, associated with a
power of two.
o 4 lights: 2^3, 2^2, 2^1, 2^0
If the light is on, its 1 (so 2^3 * 1) = 8
If the light is off, its 0 (so 2^2 *0) = 0
Can represent total of 256 values
Can use these values to represent text.
Caesars Cipher: Encryption (Your First Program!)
^Encrypt GO JUMBOS!
Insert Text.
Go through sentence 1 letter at a time from 0.
If the character is not a letter, SKIP
Add 3 to the character AND wrap using *modulus
Ouput Answer
Commenting in C++
TA office hours: 116/118
Chris Gregg: Office Hours:
Wednesday 10:30am-12:30pm

You might also like