Vous êtes sur la page 1sur 7

BITS AND BYTES

Dayang Amal Hayati binti


Awang Hidop

10D0127
OBJECTIVES
BITS AND BYTES
A binary number is either a 0 or a 1 and is
known as a 'bit' or b inary dig it .

However, the CPU cannot deal with just one bit at a time, it
is just too small.  It usually deals with 8 bits at a time,
which is known as a Byte . 

11100101 is a byte, 10000111 is also a byte, or any other


combination you can think of which contains 8 zeros and
ones.

Why does all this matter?

We often need to process words, so the computer must be able to


store letters and other keyboard characters.  This is done by
making up a code.  Each number represents a character.

One common code is A=65, B = 66 and so on.  This is called


ASCII code or A merican S tandard C ode for I nformation I
nterchange. 

Each ASCII character occupies just one byte.  The eight bit
binary code or byte which represents the letter A is
0 1 0 0 0 0 0 1

The word JOHN would take 4 bytes of memory to store.


RAM can store millions of bytes.  So of course all that information
needs to be accessed by the CPU.  It does this through a method
called, 'addressing'.  Every location in RAM has a unique address.

 Each storage location (address) contains a byte which represents


data in the form of:
a number, a character or string of characters, a computer
instruction, part of a picture , the address of a location in store

But remember - all this information is stored as strings of 1s and


0s i.e. binary code
                           

 
ASCII - American Standard Code (for) Information
Interchange
                           

  Letters in the Alphabet:                

                           

  Value 128 64 32 16 8 4 2 1      

 
A On/Off
Signal 0 1 0 0 0 0 0 1      

                   
                   

     
ALWAY     As  'A' is  the first         
S letter in the alphabet,
      THE     the  ASCII  Code         
must equate to 1.
      SAME                  

                           
                           
                           

  Value 128 64 32 16 8 4 2 1      

 
Z On/Off
Signal 0 1 0 1 1 0 1 0      

                           
                           
                           
As 'Z' is the last
                           
letter in the
           
alphabet,   the ASCII
             
          Code
  must
  equate
  to            
          26.
                 
16 + 8 + 2 =
                           
26
               

  Words in ASCII 8-bit Binary Code!    

               
 
Can you work out what the binary code is for the following words?
 
 
 
When you get it right, you will be told! :)
 
 
 
 

               

  C A T        

               

Binary Code:   01000001          

    Correct          

               

               

  H E L L O    

               

Binary Code:              

               

               

Have a go on your own… Can you spell your name in Binary Code?

               

               

               

Vous aimerez peut-être aussi