# Transistors

Moore’s law is the observation that the number of transistors in a microchip doubles every two years. Computer companies have been racing to achieve this feat, and succeeding. CPUs and GPUs with transistor counts over 1 billion are common.

Aside from the incredible engineering problems in fabricating these chips, (take ECE 120AB if you want to learn about fabrication,) how do you create a design to take advantage of that many transistors?

You can use transistors to create a set of components that are functionally complete, meaning they can be used to solve any boolean expression. Examples of components include

• and/or/not/nand/nor/xor gates,
• multiplexers, and
• block memory (ROM/RAM).

NAND and NOR gates from MOSFETs
Multiplexer from MOSFETs
SRAM Cell from MOSFETs
These are just a few examples of using transistors to implement these components. Different designs have tradeoffs in speed, power usage, and size. Take ECE 122A if you want to learn more about using transistors in digital circuits.

# Combinational Logic

To implement any boolean expression, you will need to use combinational logic. Combinational logic is a type of digital logic that is run independent of clock pulses. For example:

• Xor = AB’ + A’B
• Sum = A ⊕ B ⊕ Cin
• Cout = AB + Cin(A ⊕ B)
• Mux2 = S’ I0 + S I1

# Flip Flops

To change the value of registers on clock edges, you will need to use flip flops. Combinational logic is inputted to a flip flop, then is saved once it receives a clock pulse. You can configure a flip flop to activate either on a positive clock edge ↱ or negative clock edge ↳.

D-Flip-Flop from Gates
Using a D-Flip-Flop in a toggle circuit