# Introduction to Computer Architecture

Print Cheatsheet

### 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
``````

### Computer Instructions

Computer instructions are written in binary, also known as machine code. Computer hardware operates on a series of these binary instructions through pulsating power signals that signify either `OFF` or `ON` based on the binary digits `0` and `1` respectively.

### 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``````

### Least and Most Significant Bits (LSBs and MSBs)

The Least Significant Bit (LSB) is the farthest right digit in a binary number while the Most Significant Bit (MSB) is the leftmost digit. `0` is an acceptable value for both the MSB and the LSB.

``````8675309 expressed in Binary:

100001000101111111101101
^                      ^
MSB                    LSB``````

### Binary Data

Binary data is any set of expressions that result in a response set of only two answers.

``````Binary Data Examples:
- TRUE or FALSE
- ON or OFF
- 0 or 1
- LEFT or RIGHT

Non-Binary Data Examples:
- TRUE/FALSE/MAYBE
- LEFT/RIGHT/CENTER
- Ages of coworkers``````