Show Menu
Cheatography

ComputerArchitectureCSCI2020 Cheat Sheet (DRAFT) by

For Class exam I will be taking. Include some terms examples of what is on my exam. Not sure if I will publish.

This is a draft cheat sheet. It is a work in progress and is not finished yet.

CSCI 2020 Computer Archit­ecture

Basic binary math and logic
Binary numbers operate in base 2, where the only digits are
0
and
1
. They are fundam­ental in digital systems, logic design, and computing.
1. Binary Arithm­etic: Addition: Binary addition is similar to decimal addition, with the rules:
2. Binary Subtra­ction: two's comple­men­t(i­nvert bits add 1) of what is subtra­cting, add what is being taken from and discard carry

Logical Operat­ions:
- AND (
A * B
)
: Outputs
1
only if both inputs are
1

- OR (
A + B
)
: Outputs
1
if at least one input is
1
.
- XOR (
A ⊕ B
)
: Outputs
1
if the inputs are different.
- NOT (
¬A
)
: Inverts the input.
- NAND (
¬(A * B)
)
: Outputs
1
unless both inputs are
1
.
- NOR (
¬(A + B)
)
: Outputs
1
only if both inputs are
0
.
- XNOR (
¬(A ⊕ B)
)
: Outputs
1
if the inputs are the same.
- Implic­ation (
A → B
)
: Outputs
1
unless
A = 1
and
B = 0
.
- Equiva­lence (
A ↔ B
)
: Outputs
1
if A and B are equal. Equivalent to XNOR.

Total bit Co­mbi­nations = 2n


Dec → Hex | Divide by 16, use remainders as hex digits. | 156 (dec) | 9C (hex)
Hex → Dec | Multiply digits by 16^n, sum the results. | 1A3 (hex) | 419 (dec)
Bin → Dec | Multiply bits by 2^n, sum the results. | 1101 (bin) | 13 (dec)
Dec → Oct | Divide by 8, use remainders as octal digits. | 125 (dec) | 175 (oct)
Bin → Oct | Group binary into 3 bits, convert each group to octal. | 110101 (bin) | 65 (oct)

Sign Repres­ent­ation MSB(the front of bit):
0
(posit­ive),
1
(negative) Negative: Invert and add 1 | | Arithmetic | Complex | Simplified (no separate subtra­ction) | | Range (4-bit) | (signed Magnit­ude(\( -7 \) to \( +7 \) | (two's comple­ment)\( -8 \) to \( +7 \) |
 

Combin­ational Logic

Combin­ational logic

Definition
- Combin­ational Circuit: Output depends only on current inputs; no memory.
- Sequential Circuit: Output depends on current inputs and past states (memory)
Key Differ­ences
| Feature | Combin­ational Circuit | Sequential Circuit |
|-----­---­---­---­---­---­--|­---­---­---­---­---­---­---­---­---­---­--|­---­---­---­---­---­---­---­---­---­----|
| Output Dependency | Current inputs only | Current inputs + past states |
| Memory | No memory | Has memory (e.g., flip-f­lops) |
| Feedback | No feedback loop | Includes feedback loop |
| Clock Signal | Not required | Requires a clock signal |
| Time Dependency | Outputs appear immedi­ately | Outputs depend on clock cycles |
Examples
- Combin­ational Circuit:
- Half Adder: Adds two inputs, outputs Sum = \( A XOR B ), Carry = \( A AND B ).
- Sequential Circuit:
- D Flip-Flop: Stores 1 bit of data; updates on clock edge.
Applic­ations
- Combin­ational Circuits:
- Adders, multip­lexers, encoders, decoders.
- Sequential Circuits:
- Counters, shift registers, memory units.
Summary
- Combin­ational Circuits:
- Simple, stateless, used for logical operat­ions.
- Sequential Circuits:
- Complex, state-­based, used for time-s­ens­itive or memory­-based tasks.
For AND(also minterm) gates
- Identity: AND-ing anything with
1
keeps it the same.
- Null: AND-ing anything with
0
makes it
0
.
- Commut­ative: Changing the order of inputs doesn’t matter.
- Associ­ative: Grouping inputs in any way doesn’t matter.
-Minterm = A⋅B‾⋅C⋅D‾
- sum of products: Y=(A⋅B­‾⋅C­⋅D)­+(A­‾⋅B­⋅C⋅­D‾)­+(A­⋅B⋅­C‾⋅D‾)
For OR(max­term) gate
- Identity: \( A + 0 = A \)
- Null: \( A + 1 = 1 \)
- Commut­ative: \( A + B = B + A \)
- Associ­ative: \( A + (B + C) = (A + B) + C \)
- Idempotent: \( A + A = A \)
- Distri­butive:
- Over AND: \( A + (B AND C) = (A + B) AND (A + C) \)
- Over OR: ( A + (B + C) = (A + B) + C )
-- Maxterm = (A‾+B+­C‾+D)
- Product of sums: Y=(A‾+­B+C­‾+D­)⋅(­A+B­‾+C­+D‾­)⋅(­A‾+­B‾+­C‾+D)
Prority Encoder
Definition:
A Priority Encoder is a combin­ational circuit that encodes the position of the highes­t-p­riority active input into a binary output.
Key Features:
- Inputs: \( 2^n \) input lines; only one active at a time is expected.
- Outputs: \( n \) output lines repres­enting the binary code of the highes­t-p­riority input.
- Priority: Higher­-order inputs have precedence over lower-­order inputs.
- Enable Output: Indicates if any input is active (optio­nal).
Logic Expres­sions (4-to-2 Priority Encoder):
- Y_1 = D_3 + D_2
- Y_0 = D_3 +{D_2}‾ * D_1
- Enable Output (E = D_3 + D_2 + D_1 + D_0
Applic­ations:
1. Interrupt Handling: Assigns priority to multiple interrupt signals in proces­sors.
2. Data Compre­ssion: Encodes multiple inputs into fewer bits.
3. Memory Decoding: Selects the highes­t-p­riority address or resource.
Advantages:
- Handles multiple inputs with priority logic.
- Compresses input size effici­ently.
Limita­tions:
- Requires additional handling if multiple inputs have the same priority.
- Extra circuitry needed for "no active input" condit­ions.

Causes of Delay in Circuit State Change (Low to High)
Definition:
Delays occur when a circuit element transi­tions from
0
(low) to
1
(high) due to physical and electrical factors.
Key Causes of Delay
1. Propag­ation Delay:
- Time taken for a signal to propagate through a circuit element.
- Affects overall circuit speed.
2. Gate Capaci­tance:
- Time required to charge or discharge the transi­stor's gate capaci­tance.
3. Load Capaci­tance:
- Higher load capaci­tance slows the chargi­ng/­dis­cha­rging process.
4. Resistance of Interc­onnects:
- Higher resistance in wires increases \( RC \) delay.
5. Signal Rise Time:
- Time taken for the signal to rise from 10% to 90% of its final value.
6. Threshold Voltage:
- Higher voltage thresholds cause slower transi­tions.
7. Noise and Signal Integrity:
- Crosstalk, interf­erence, or power fluctu­ations can distort signals.
8. Power Supply Voltage:
- Lower voltages reduce drive strength, increasing delay.
9. Temper­ature Effects:
- High temper­atures slow down transistor switching.
10. Manufa­cturing Variations:
- Fabric­ation incons­ist­encies can result in slower compon­ents.
11. Clock Synchr­oni­zation:
- Skew or jitter in clock signals causes timing delays in sequential circuits.
12. Parasitic Elements:
- Unintended resist­ance, capaci­tance, or inductance contri­butes to delay.
Summary:
Delays result from intrinsic (e.g., propag­ation, capaci­tance) and external factors (e.g., noise, temper­ature). Optimizing design and materials can mitigate these delays.

Combin­ational Logic

Combin­ational logic

Definition
- Combin­ational Circuit: Output depends only on current inputs; no memory.
- Sequential Circuit: Output depends on current inputs and past states (memory)
Key Differ­ences
| Feature | Combin­ational Circuit | Sequential Circuit |
|-----­---­---­---­---­---­--|­---­---­---­---­---­---­---­---­---­---­--|­---­---­---­---­---­---­---­---­---­----|
| Output Dependency | Current inputs only | Current inputs + past states |
| Memory | No memory | Has memory (e.g., flip-f­lops) |
| Feedback | No feedback loop | Includes feedback loop |
| Clock Signal | Not required | Requires a clock signal |
| Time Dependency | Outputs appear immedi­ately | Outputs depend on clock cycles |
Examples
- Combin­ational Circuit:
- Half Adder: Adds two inputs, outputs Sum = \( A XOR B ), Carry = \( A AND B ).
- Sequential Circuit:
- D Flip-Flop: Stores 1 bit of data; updates on clock edge.
Applic­ations
- Combin­ational Circuits:
- Adders, multip­lexers, encoders, decoders.
- Sequential Circuits:
- Counters, shift registers, memory units.
Summary
- Combin­ational Circuits:
- Simple, stateless, used for logical operat­ions.
- Sequential Circuits:
- Complex, state-­based, used for time-s­ens­itive or memory­-based tasks.
For AND(also minterm) gates
- Identity: AND-ing anything with
1
keeps it the same.
- Null: AND-ing anything with
0
makes it
0
.
- Commut­ative: Changing the order of inputs doesn’t matter.
- Associ­ative: Grouping inputs in any way doesn’t matter.
-Minterm = A⋅B‾⋅C⋅D‾
- sum of products: Y=(A⋅B­‾⋅C­⋅D)­+(A­‾⋅B­⋅C⋅­D‾)­+(A­⋅B⋅­C‾⋅D‾)
For OR(max­term) gate
- Identity: \( A + 0 = A \)
- Null: \( A + 1 = 1 \)
- Commut­ative: \( A + B = B + A \)
- Associ­ative: \( A + (B + C) = (A + B) + C \)
- Idempotent: \( A + A = A \)
- Distri­butive:
- Over AND: \( A + (B AND C) = (A + B) AND (A + C) \)
- Over OR: ( A + (B + C) = (A + B) + C )
-- Maxterm = (A‾+B+­C‾+D)
- Product of sums: Y=(A‾+­B+C­‾+D­)⋅(­A+B­‾+C­+D‾­)⋅(­A‾+­B‾+­C‾+D)
Prority Encoder
Definition:
A Priority Encoder is a combin­ational circuit that encodes the position of the highes­t-p­riority active input into a binary output.
Key Features:
- Inputs: \( 2^n \) input lines; only one active at a time is expected.
- Outputs: \( n \) output lines repres­enting the binary code of the highes­t-p­riority input.
- Priority: Higher­-order inputs have precedence over lower-­order inputs.
- Enable Output: Indicates if any input is active (optio­nal).
Logic Expres­sions (4-to-2 Priority Encoder):
- Y_1 = D_3 + D_2
- Y_0 = D_3 +{D_2}‾ * D_1
- Enable Output (E = D_3 + D_2 + D_1 + D_0
Applic­ations:
1. Interrupt Handling: Assigns priority to multiple interrupt signals in proces­sors.
2. Data Compre­ssion: Encodes multiple inputs into fewer bits.
3. Memory Decoding: Selects the highes­t-p­riority address or resource.
Advantages:
- Handles multiple inputs with priority logic.
- Compresses input size effici­ently.
Limita­tions:
- Requires additional handling if multiple inputs have the same priority.
- Extra circuitry needed for "no active input" condit­ions.

Causes of Delay in Circuit State Change (Low to High)
Definition:
Delays occur when a circuit element transi­tions from
0
(low) to
1
(high) due to physical and electrical factors.
Key Causes of Delay
1. Propag­ation Delay:
- Time taken for a signal to propagate through a circuit element.
- Affects overall circuit speed.
2. Gate Capaci­tance:
- Time required to charge or discharge the transi­stor's gate capaci­tance.
3. Load Capaci­tance:
- Higher load capaci­tance slows the chargi­ng/­dis­cha­rging process.
4. Resistance of Interc­onnects:
- Higher resistance in wires increases \( RC \) delay.
5. Signal Rise Time:
- Time taken for the signal to rise from 10% to 90% of its final value.
6. Threshold Voltage:
- Higher voltage thresholds cause slower transi­tions.
7. Noise and Signal Integrity:
- Crosstalk, interf­erence, or power fluctu­ations can distort signals.
8. Power Supply Voltage:
- Lower voltages reduce drive strength, increasing delay.
9. Temper­ature Effects:
- High temper­atures slow down transistor switching.
10. Manufa­cturing Variations:
- Fabric­ation incons­ist­encies can result in slower compon­ents.
11. Clock Synchr­oni­zation:
- Skew or jitter in clock signals causes timing delays in sequential circuits.
12. Parasitic Elements:
- Unintended resist­ance, capaci­tance, or inductance contri­butes to delay.
Summary:
Delays result from intrinsic (e.g., propag­ation, capaci­tance) and external factors (e.g., noise, temper­ature). Optimizing design and materials can mitigate these delays.
 

Sequential Logic

State Table for A, B, Clock and XOR gate what is Q?
To determine the contents of the output register Q, we’ll use a state table that describes the relati­onship between the inputs A, B, the clock, and the XNOR gate, along with the resulting Q.
XNOR Gate Logic
- The output of an XNOR gate is A↔B (logical equiva­lence):
- A ⊕ B = 0: ( A ⊕ B )‾= 1(when A = B)
- A⊕B=1 ( A ⊕ B )‾ = 0: (when A≠B)
The output Q of the register will update on every clock edge based on the XNOR output.
State Table
Assume:
- Inputs A and B are parallel inputs (change at each clock cycle).
- Register Q is updated at every positive clock edge with the XNOR output.