0% found this document useful (0 votes)
13 views7 pages

Lesson 2 - Binary

Uploaded by

Marc McRae
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views7 pages

Lesson 2 - Binary

Uploaded by

Marc McRae
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Binary, ASCII and Unicode

Lesson 2
Input and Output

• Computer Programming is about taking some input and creating some output -
thus solving a problem. What happens in between the input and output, what we
could call a black box, is the focus of this course.
Binary
• For example, we may need to take attendance for a class.
We could use a system called unary to count, one finger at
a time.

• Computers today count using a system called binary. It’s


from the term binary digit that we get a familiar term called
bit. A bit is a zero or one: on or off.

• Computers only speak in terms of zeros and ones. Zeros


represent off. Ones represent on. Computers are millions,
and perhaps billions, of transistors that are being turned on
and off.

• If you imagine using a light bulb, a single bulb can only


count from zero to one.

• However, if you were to have three light bulbs, there are


more options open to you!
ASCII
• Just as numbers are binary patterns of ones and zeros,
letters are represented using ones and zeros too!
• Since there is an overlap between the ones and zeros that
represent numbers and letters, the ASCII standard was
created to map specific letters to specific numbers.
• For example, the letter A was decided to map to the
number 65. 01000001 represents the number 65 in binary.
• If you received a text message, the binary under that
message might represent the numbers 72, 73, and 33.
Mapping these out to ASCII, your message would look as
follows:
• H I !
• 72 73 33
• Thank goodness for standards like ASCII that allow us to
agree upon these values!
Here is an expanded map of ASCII values:
• As time has rolled on, there are more and more ways to
communicate via text.
• Since there were not enough digits in binary to represent all
the various characters that could be represented by humans,
the Unicode standard expanded the number of bits that can
be transmitted and understood by computers. Unicode
includes not only special characters, but emoji as well.
• There are emoji that you probably use every day. The
following may look familiar to you:
• Computer scientists faced a challenge when wanting to
assign various skin tones to each emoji to allow the
communication to be further personalized. In this case, the
creators and contributors of emoji decided that the initial bits
would be the structure of the emoji itself, followed by skin
tone.
• For example, the unicode for a generic thumbs up is
U+1F44D. However, the following represents the same
thumbs up with a different skin tone: U+1F44D U+1F3FD.
• More and more features are being added to the Unicode
standard to represent further characters and emoji.
• Zeros and ones can be used to represent color.
• Red, green, and blue (called RGB) is a combination of three
numbers.

• Taking our previously used 72, 73, and 33, which said HI! via text,
would be interpreted by image readers as a light shade of yellow.
The red value would be 72, the green value would be 73, and the
blue would be 33.

• Further, zeros and ones can be used to represent images, videos,


and music!

• Images are simply collections of RGB values.

• Videos are sequences of many images that are stored together,


just like a flipbook.

• Music can be represented through MIDI data.

You might also like