Tuesday, September 6, 2016

Bits and Bytes

Bits and Bytes

A byte is a sequence of 8 bits (enough to represent one alphanumeric character) processed as a single unit of information. A single letter or character would use one byte of memory (8 bits), two characters would use two bytes (16 bits).
Put another way, a bit is either an 'on' or an 'off' which is processed by a computer processor, we represent 'on' as '1' and 'off' as '0'. 8 bits are known as a byte, and it is bytes which are used to pass our information in it's basic form - characters.
An alphanumeric character (e.g. a letter or number such as 'A', 'B' or '7') is stored as 1 byte. For example, to store the letter 'R' uses 1 byte, which is stored by the computer as 8 bits, '01010010'.
A document containing 100 characters would use 100 bytes (800 bits) - assuming the file didn't have any overhead (additional data about the file which forms part of the file). Note, many non-alphanumeric characters such as symbols and foreign language characters use multiple bytes.



  • ASCII is an encoding representing each typed letter by a number.
  • Each number is stored in one byte (so the number is in 0..255) .
  • A is 65 .
  • B is 66 .
  • a is 96 .
  • space is 32 .
  • "Unicode" is an encoding for mandarin, greek, arabic, etc. languages, typically 2-bytes per "letter" .

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home