COMP311 Midterm 1

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Literal

A single variable. May be complemented

How do you do 2's complement in subtraction?

Instead of using the subtraction operator, add together the two numbers but negate the number to be subtracted

DeMorgan's Theorem

~(p v q) <=> ~p ^ ~q ~(p ^ q) <=> ~p v ~q

Associative

(A * B) * C = A * (B* C) // same for addition

How would you use 4 full-adders to add together A and B?

** Draw here **

What are the K Map rules?

1) All squares in each circle must contain 1's 2) Groups may be horizontal or vertical, but not diagonal 3) Groups must contain 2^n cells, where n = 0, 1, 2, etc.... 4) Each group must be as large as possible 5) Each cell containing a 1 must be in at least one group 6) Groups may wrap around the table 7) Each circle should contain at least one unique 1

What does fewer transistors mean ?

1) Smaller area 2) Lower power consumption 3) Shorter delay from input to output 4) Lower cost ($)

How many transistors are XOR and XNOR gates?

12

How many transistors is a NOT gate?

2

When adding 3 values (such as in binary addition when there is a value in the carry out column), what operation would you use and how does this operation work?

3 input XOR This is logically equivalent to (A XOR B) XC, and is 1 only when an odd number of inputs are 1

Full Adder Abstraction

3 one bit inputs (A, B, Ci -> carry out from previous column) 2 one bit inputs (Co -> carry out, S -> result from this column) ** Practice drawing this out **

How many transistors are NAND and NOR gates?

4

How many transistors if a AND and OR gate?

6

What is the minimum number of transistors I would need to implement a 3-input NAND gate?

8 (this is because you would 3 transistors for pull up network, 3 transistors for pull down network, and 2 for CMOS inverter)

Distributive

A + (B * C) = A + B * A + C A * (B + C) = A *B + A * C

Identity law

A + 0 = A; A * 1 = A

Null Law

A + 1 = 1 A * 0 = 0

Idempotent Law

A + A = A A * A = A

Commutative

A + B = B + A A * B = B * A

Complement Law

A + notA = 1 A * notA = 0

What is the formula for the carry out bit when adding two bits together?

A X B (only 1 when both A and B are 1)

What is the formula for adding two bits together?

A XOR B

Multiplexer

A circuit that chooses an output from among two inputs based on the value of a select signal

What is a CMOS inverter?

A inverter that utilizes a pMOS and nMOS transistor to make invert an input (1 -> 0 , 0 -> 1)

Essential Prime Implicant

A prime implicant (an implicant that is not a subset of any other implicant) that is not covered by one or more prime implicants - We MUST use this group in our final solution in order to cover all 1s

Canonical Sum of Products

A sum of products form in which each product contains all literals - (XYZ + XnotYZ) - NOT (XY + Z) -> simplified sum of products form

Maxterm

A sum term in a Boolean expression where all possible variables appear once in true or complement form.

Involution Law

AB + not A = B + not A

What is a NOR logically equivalent to?

AND gate with both inputs inverted

Product Term

AND of literals (single terms cannot be negated but not parts or the whole AND)

Prime Implicant

An implicant that is not a subset of any other implicant

What is the XOR rule when simplifying Boolean expressions?

AnotB + BnotA

Implicant

Any product term that is a 1 for a given Boolean Equation (does need to be a minterm - contain all literals)

Gate voltage

Controls flow of electrons between source and drain - Vg (gate voltage) = logic low -> current cannot flow between source and drain - Vg (gate voltage) = logic high -> current can flow between source and drain

What are the ways in which you minimize transistor count in a circuit design?

Convert AND and OR -> NAND - Add inverter to end of AND - Add two inverters to input of OR gate OR Convert OR and AND -> NOR - Add inverter to end of OR - Add two inverters to inputs of AND ** When you add inverters, you must add on the other side to keep balance **

When comparing logic high outputs, which transistor outputs a higher voltage?

Due to the physical characteristics of the nMOS transistor, it outputs a voltage lower than Vdd - If both nMOS and pMOS have the same logic high, nMOS will have a lower drain voltage - nMOS has a weak logic 1 (voltage is less than Vdd)

When comparing logic low outputs, which transistor outputs a lower voltage?

Due to the physical characteristics of the pMOS transistor, it outputs a voltage higher than ground - If both nMOS and pMOS have the same logic low value, pMOS will have a higher drain voltage - pMOS has a weak logic 0 (voltage is greater than 0)

Using the full adder abstraction, how would you perform subtraction in 2's complement form?

First, you would use a multiplexer to determine whether addition or subtraction is to be performed. Then, the input for the addition input should be the normal B input. The input for the subtraction input should be B inverted. Also, since one needs to be added if subtraction is to be performed, add K as the carry out column (since it is 1 if subtraction is to be performed). ** Keep in mind that these abstractions hide the fact that it is operating on EACH bit (this makes a lot more sense in this context) **

What are logically equivalent circuits?

For any input, they will produce the same output (their truth tables are equivalent)

Logic Levels

Logic high range to Logic low range - Any values in between these are within the forbidden zone and can lead to unpredictable results - The exact voltage ranges are determined by the characteristics of the transistor

How do you determine max terms and min terms - what is the difference?

Max terms are different in that if X = 0, you use X and if X = 1, then you should use notX while min terms are the opposite. For example, if X = 0, Y = 0, and Z = 1, then the max term for that would be XYnotZ. When determining the equation for something, using minterms you look at the outputs that are 1 and for max terms you look at the outputs that are 0.

What is NAND logically equivalent to?

OR gate with both inputs inverted

Nonessential Prime Implicant

Prime implicant that has no element that cannot be covered by other prime element - This means that although is it not a subset of any other prime implicant, all the 1s within this group can be covered by other prime implicants

Minterm

Product term in which all variables appear once (ABC, notABC, but NOT AC)

How do you design circuits using transistors?

Pull-up network (drives the output when it should be high): pMOS transistors Pull-down network (drives the output when it should be low): nMOS transistors - The input values (such as A and B, for example) tell us which switches are closed; act like A and B are the inputs or source

How do you represent a negative number in 2's complement?

Represent the number positively, flip the bits, and add 1

How do you create a 4:1 multiplexer out of 2:1 multiplexers?

Since a 4:1 multiplexer uses S0 and S1, make a multiplexer based on these different bits. The first "layer" of 2:1 multiplexers should allow you to choose between a pair of inputs while the second "layer" of the 2:1 multiplexer allows you to make the final decision.

When is ground used in a multiplexer?

Since a multiplexer input lines has to be in the power of 2, there may be some input lines that don't have to be utilized, in which these are connected to ground.

Left shift circuit

Takes in two inputs (number to perform shift on and shamt (number of bits to shift by)) and has the result

Equality comparator

Takes in two inputs and has one one bit output - The two inputs should be the same # of inputs and in the actual implementation of the equality comparator, each bit is compared individually through XOR and these results are ANDED to see whether or not all the bits were equal

When doing 3-input AND, OR, and XOR what is important to keep in mind?

That it is logically equivalent to taking AND/OR/XOR/NOR/etc. of first two inputs, then that answer to last input - For example, XOR of is 011 is 0 (not 1 as one would think) because 0 XOR 1 is 1 and 1 XOR 1 is 0

Explain what the multiplexer symbol means and how to decipher it

The inputs are on the left hand side and output is on the right hand side. The select signal is on the bottom. Then, the values WITHIN the multiplexer determine what the output is based on the select signal.

What determines the number of select bits in a multiplexer?

The number of input lines it has to choose from - For example, in a 2:1 multiplexer, there are only two input lines so one select bit is enough to represent both options - However, in an 8:1 multiplexer, there are 8 input lines so there needs to be 3 select bits to represent all 8 This is because the select signal is in bits, which means it depends on a different number of individual bits for this signal

How would you implement a left shift circuit using multiplexers?

The shamt would be the select signal on the multiplexer and the inputs on the multiplexer for each shift amount would correspond to the correct bit value

Can you explain how source, drain, and gate voltage are connected?

The source and drain are connected ONLY when the transistor is closed based on the gate. If the switch is closed, then the drain value is equal to the source value (may differ depending on which values passes well based on the transistor).

Arithmetic versus logic shifting

This happens during right shifting. Arithmetic is used for signed integers (fill in left bits with signed bit) while logic is used for unsigned integers (fill in left bits with 0s)

How do you create CMOS AND and CMOS OR circuits?

Use CMOS NAND and CMOS NOR connected to a CMOS inverter - This proves that AND and OR circuits have more transistors than NAND and NOR circuits do

How do you treat don't cares in K-Maps?

We can treat a don't care value as either a 0 or 1. An X can be circled if it helps us cover the 1s with fewer or larger circles, but they do not have to be circled if they are not helpful. - A group of just X's should not be circled because this only increases the # of groups you have (and the point of K-maps is to minimize the # of groups you have)

Sum of Products (SOP)

When two or more products (AND) are summed (OR) together - Y = AB + AC - NOT Y = (A+B)(C+A) -> product of sums

What are the two types of transistors and how do they differ?

nMOS & pMOS - nMOS behaves as an open switch when Vg is low and a closed switch when Vg is high - pMOS behaves as an open switch when Vg is high and a closed switch when Vg is low ** closed switch means that source and drain are connected **

How to differentiate between pMOS and nMOS transistors when drawing?

nMOS arrow points to left and pMOS arrow points to the right OR pMOS has a circle to the left while nMOS does not have one


Kaugnay na mga set ng pag-aaral

IDRL 312 Conflict and Accommodation / Lesson Objectives

View Set

Final Exam for Prin of psych testing (ch 10-14) (slides)

View Set

Chapter 26: Documentation and Informatics

View Set

Unit 4 (ch.29 hw) - Development, pregnancy, & hereditary

View Set

ATI fundamentals practice test B

View Set

Behavioral Health Slido Module 4

View Set

Psych 21A Ch. 3 Review Questions

View Set

Infectious Dz Exam 3: Malaria (5)

View Set