Last Modified: 1/11/1999
[Previous] [Home] [Next]

Bits and Bytes



  • How 1's and 0's create numbers:
                0  -->   0
                1  -->   1
               10  -->   2
               11  -->   3
              100  -->   4
              101  -->   5
              . . . . . .
     101111001000  -->   3016
    

  • Text (characters): these are stored as 8-bit "bytes". About half of the characters are actual printing characters, but many are non-printing, such as the "bell", "carriage return", "line-feed", "ack", "nak", and others. Typical byte patterns include:
                  00100000  -->  blank space
                  00100001  -->  !
                  01000001  -->  A
                  01100001  -->  a
                  and so on 
    
    Thus any written text (e.g., Shakesphere or any dictionary) can be fully represented with strings of 1's and 0's. The last 7 bits of this 8-bit code stand for the 128 characters that make up the ASCII code (American Standard Code for Information Interchange), so when the 8-bit code starts with a '0' the characters are ASCII. Most of these characters are printable ones.

  • Pictures: consider the following two diagrams:
    
           Picture            1's and 0,s
      ........X........  00000000100000000
      ...... X.X.......  00000001010000000
      ......X...X......  00000010001000000
      .....X.....X.....  00000100000100000
      ....X.......X....  00001000000010000
      ...X.........X...  00010000000001000
      ..X...........X..  00100000000000100
      .X.............X.  01000000000000010
      X...............X  10000000000000001
    
    For black and white, we represent each pixel (picture element) with a 1 or 0; for color we represent each pixel with either a string og 8 bits (256 colors), 16 bit (65000 colors), or 24 bits ( 8 bits Red, 8 bits Green, 8 bits Blue for 16.7 million colors).

  • Sounds: we can represent each pitch at any given instant as a binary number (harmonics are represented as a set of binary numbers) and so all sounds can be represented by strings of 1's and 0's

[Previous] [Home] [Next]