Binary Operations

Binary Binary is a base-2 numeral system: A simple way to represent numbers using only two states. Binary Decimal Hexadecimal 0000 00 00 0001 01 01 0010 02 02 0011 03 03 0100 04 04 0101 05 05 0110 06 06 0111 07 07 1000 08 08 1001 09 09 1010 10 0A 1011 11 0B 1100 12 0C 1101 13 0D 1110 14 0E 1111 15 0F ...

7 min · 1441 words · TrudeEH

CPU Architecture

Components Registers We can combine registers to reduce the amount of wires needed. Using a data bus (wiring at the top) and a binary decoder, we can select which register to read/write to. Memory Assembly Assembly is a human-friendly representation of code: binary values that a computer can understand. An assembler converts ASM instructions into machine code, which is given to the CPU as input. Arithmetic Operations For example, a simple computer architecture could use 00 to represent arithmetic operations. To decide which type of operation to execute (subtraction, multiplication, addition, etc), the 3rd and 4th bits could be used. Using a index, we can build an inefficient, but simple circuit to do this. This type of circuit is an Arithmetic Logic Unit (ALU). ...

5 min · 1037 words · TrudeEH

Logic Gates

NOT Invert the input. Truth Table Input Output 0 1 1 0 AND Output 1 only when both inputs are 1. Truth Table A B Output 0 0 0 0 1 0 1 0 0 1 1 1 OR Output 1 if at least one input is 1. Truth Table A B Output 0 0 0 0 1 1 1 0 1 1 1 1 NAND An AND gate followed by a NOT gate. ...

1 min · 165 words · TrudeEH

Memory

Remembering Data An OR gate could be used to store a single bit. If the input A is changed to 1, the OR gate will output 1, and then receive it. Even after the input A is set to 0, the output does not change. The OR gate “remembers” that, at one point in the past, the A input was set to 1. The inverse can be done with an AND gate. To remember either a 1 or a 0, we can do the following: ...

3 min · 433 words · TrudeEH