How the computers work. Logic gates: 0s and 1s. Information encoding into the binary system. Bits and bytes.

How computers work

Logic gates: 0s and 1s. Binary system

At a physical level, the 0's and 1's are stored in the central processing unit (CPU) of a computer system using logic gates or transistors. Transistors are microscopic switches that control the flow of electricity. If a current passes through the transistor (switch closed), this represents a 1. If a current doesn't pass through (switch open), this represents a 0. Because of its straightforward implementation in digital electronic circuitry using logic gates, the binary system is used internally by almost all modern computers and computer-based devices. Each digit is referred to as a bit. The term also refers to any digital encoding/decoding system in which there are exactly two possible states. In digital data memory, storage, processing, and communications, the 0 and 1 values are sometimes called "low" and "high," respectively. Binary information is also transmitted using magnetic properties; the two different types of polarities are used to represent zeros and ones. An optical disk, such as a CD-ROM or DVD, also stores binary information in the form of pits and lands (the area between the pits).

Information encoding into the binary system

Computer software translates between the binary information and the information you actually work with on a computer, such as decimal numbers, text, photos, sound, and video. When you type for example the capital letter (upper case) Z on your keyboard, the computer, in order to work with this letter, translates it into the binary code of: 01011010. This way, we could say that the flow of information the computer has to works with is encoded as a long string of 0s and 1s. Binary information is sometimes also referred to as machine language since it represents the most fundamental level of information stored in a computer system.

Bits and bytes

Bits can be grouped together to make them easier to work with. A group of 8 bits is called a byte. Other groupings include:

  • Grouping = Equivalent;
  • Nibble = 4 bits (half a byte);
  • Byte = 8 bits;
  • Kilobyte (KB) = 1024 bytes (or 1024 × 8 bits);
  • Megabyte (MB) = 1024 kilobytes (or 1024 bytes × 1024 bytes = 1048576 bytes);
  • Gigabyte (GB) = 1024 Megabytes;
  • Terabyte (TB) = 1024 Gigabytes;

Most computers can process millions of bits every second. A hard drive's storage capacity is measured in Gigabytes or Terabytes. RAM is often measured in Megabytes or Gigabytes.