Codecademy Logo

Computer Basics

Binary Numbering System

The binary numbering system is built on a base of 2. Every time we reach a power of 2, we add another digit. The decimal system works the same way, just with 10.

Counting to 10 in binary: Decimal Binary 0 0 1 1 2 10 3 11 4 100 5 101 6 110 7 111 8 1000 9 1001 10 1010

Main Functions of a Computer

There are four main functions of a computer that make user interaction possible:

  • Input
  • Processing
  • Memory
  • Output
- Input is data we give to our computers through interactions - Processing is comprised of the translation of input and the instructions given for output - Memory is used to store either temporary or permanent information - Output is the information that gets returned by the computer

Control Unit (CU)

The Control Unit (CU) on a CPU receives information from the software; then, it distributes and directs the data to the relevant hardware components.

Some functions of the CU: - Determine what/where the next instruction must go for processing - Send clock signals to all hardware to force synchronous operations - Send memory taskings if appropriate

Arithmetic and Logic Unit (ALU)

An Arithmetic Logic Unit (ALU) is a digital circuit used to perform arithmetic and logic operations. It is the fundamental building block of the CPU.

Some ALU functions: - Addition & subtraction - Determining equality - AND/OR/XOR/NOR/NOT/NAND logic gates and more!

Registers

A register is a volatile memory system that provides the CPU with rapid access to information it is immediately using.

Functions of a register: - Store temporary data for immediate processing by the ALU - Hold "flag" information if an operation results in overflow or triggers other flags - Hold the location of the next instruction to be processed by the CPU

The CPU

A Central Processing Unit (CPU) is the electronic circuitry that executes instructions based on an input of binary data (0’s and 1’s). The CPU consists of the Control Unit (CU), the Arithmetic and Logic Unit (ALU), and registers (Immediate Access Store).

Random Access Memory (RAM)

Random Access Memory, or RAM, is additional high-speed memory that a computer uses to store and access information on a short-term basis.

Hard Disks

Hard disks, or hard drives, are responsible for the long-term, or secondary storage of data and programs.

The Mainboard

The mainboard, or motherboard, is a printed circuit board that houses important hardware components via ports.

Ports

A port is a physical outlet used to connect devices to a computer. A computer typically contains multiple ports. This connection allows for communication between the IO device and the computer.

Throughput Measure

Throughput is the total amount of data that can be transferred in a given amount of time.

Some common throughput numbers: - Smartphones: 500MB/Sec - Desktop drive: 5,000MB/Sec - RAM: 20,000MB/Sec

Latency Measure

Latency is the amount of delay before that transfer of data begins.

Some common latency numbers: - Read from solid state drive: 150 microseconds - Ethernet connection: 10 milliseconds - 4G connection: 80 milliseconds - Satellite connection: 900 milliseconds

CPU and GPU Measures

Both CPUs and GPUs have similar measures for computation performance. Each is made up of cores that can do one operation at a time, and these cores have set clock speeds that determine how often they can perform these operations.

Power Consumption Measure

The energy devices use is measured in watts. The greater the wattage, the greater the amount of heat the device creates. Electricity costs can be a substantial part of the cost over the lifetime of the device.