Home‎ > ‎ICT Programming‎ > ‎

Binary Codes



"There are 10 types of people in the world, those who can read binary and those who can't."






Binary Codes Unit - Table of Contents



Binary Numbers aka 01000010 01101001 01101110 01100001 01110010 01111001 00100000 01001110 01110101 01101101 01100010 01100101 01110010 01110011


Binary is a number system with base 2.

Only two digits (1 & 0) are used to write every number.

This is the foundation of almost every computer program.


Computers are not as smart as you think, in fact, they only know 2 things…

0 and 1

Everything else is told to the computer by a human, this is called programming.

For a computer:

0 means turn a circuit off

1 means turn a circuit on





Numbers are usually grouped in chunks of 8 (8 bits).
8 bits can handle any number up to 255.
If you need a number larger than that, just add a column to the left. 
The next column would be 256, then 512, and so on.










Binary code is not just about numbers. Every number, letter and symbol on your keyboard needs to be converted into binary so the computer can understand it.

We can see all these conversions in something called an ASCII table.

Every time you type a letter on your keyboard, the computer understands is as loads of 0s and 1s


Activity:
  1. Open "Notebook"
  2. Write a simple sentence
  3. Save it as "Sentence.txt"
  4. Right click on the saved file and view "Properties"  
  5. How many saved bytes is the file size?
The number of bytes should match the total number of characters (including spaces and periods)


Binary Games aka 01000010 01101001 01101110 01100001 01110010 01111001 00100000 01000111 01100001 01101101 01100101 01110011 



Binary Videos aka 01010110 01101001 01100100 01100101 01101111 01110011 




Time to Get to Work!


Assignment
 1
- Binary Code puzzles

Assignment 2 - Binary Code Time  (extra help is here)







Computer screens are divided up into a grid of small dots called pixels (picture elements). 
In a black and white picture, each pixel is either black or white. 



The letter “a” has been magnified to show the pixels. When a computer stores a picture, all that it needs to know is which dots are black and which are white.





The picture below shows us how a picture can be represented by numbers. 



Colours are encoded to Binary using RGB (Red, Green, and Blue) 
Over 16 millions colours can be created by blending these three. (see Color Picker for more combinations)




Assignment 3   Read: Binary Image Representation Complete: Colour by Numbers  (handout)

                          Hint: you will be using 8-bit binary numbers (ex. 00000010 = 2)
                             Hint: You can copy & paste this code into Pixelation to use as an example to help you get started.
                             * Note: This will not work in Internet Explorer - use Google Chrome or Firefox *

Sample Flower Code

EXAMPLE: Flower 0001001000010110000000000000000000000000001100000000000000010010000000000000010010000000000001101101100000000010010010010000000010010010010000000001101101100000000000010010000000000000010010000000000000001100000000000000001000000000000000001000000000000000001000000000000000001000000000000000001000000000000000111111000000000000011110000000000000011110000000000000011110000000000000000000000000


                             Alternative: You can also try the Favicon creation tool to make your design.
                            





Assignment 5

Read the following articles

Answer these questions. Point form is fine.

Download a copy of the questions in MS Word format. *

Binary Audio Article: http://www.bbc.co.uk/education/guides/z7vc7ty/revision/1

  1. Microphones translate ________________ into electrical signals.
  2. Analog to digital converters transfer electrical voltage to _____ of information.
  3. The _______  ________ is the number of audio samples captured every second.
  4. What is needed for higher quality sound?
  5. Before being encoded into Binary, the amplitude is stored as a __________ or a ___________.
  6. 44,100 samples per second is the same as _______________
  7. What is the sound quality of VOIP (voice over IP, i.e Skype) ?
  8. What is the bit depth on a CD compared to a DVD?
  9. What is the difference in possible values between 16 and 24 bit depth?
  10. Bit Rates are usually measured in ______________.
  11. How does the compression range of MP3's compare to uncompressed files?
  12. What does Lossless compression mean?
  13. What are the two types of open source lossless compression?
  14. Is an MP3 an example of lossless compression format?
  15. Describe the two main differences between Lossy and Lossless compression.
  16. What is the name of the open source codec for lossy compression?
  17. What is the necessary network speeds required to play HD and SD video?

Binary Video Article: http://www.bbc.co.uk/education/guides/z7vc7ty/revision/6

  1. What is the encoding term used for digital video? (hint: audio uses 'sample rate')
  2. What is the standard frame rate for digital films?
  3. How many frames is the typical HD film per second?
  4. What is the measurement for monitors and screens to indicate how many frames they can display per second?
  5. Random coloured blocks that appear in low quality video are known as _______.
  6. Video files use ____________ to run compression algorithms.
  7. Why does app developer Ivo Jansch say that we need compression for video?
  8. What is RLE and how does compression software work?


Complete this test on the subject material: http://www.bbc.co.uk/education/guides/z7vc7ty/test





  For Further Discussion

So if a binary number is usually composed of 8 bits, how does that relate to our 32 and 64 bit computers?


Read & Discuss:
32bit vs 64 bit






Decrypt this binary message 





Subpages (1): Binary Cheat Sheet
Comments