---
title: Problem set 3
heading: "Problem set 3: CMOS gates and combinational design"
eyebrow: C7 · Problem set 3
type: problems
---

::: hook
These problems use lessons 7 to 14: the CMOS inverter, CMOS gates with their sizing and power, combinational logic design, and Karnaugh maps. Number truth-table rows from 0, with the first-listed input as the top bit.
:::

::: pool
pick: 12

::: check
kind: parts
given: a = 0.05 | 0.25; C = 2 | 20; V = 0.9 | 1.8 | 3.3; f = 0.1 | 2

## A node of {C} fF switches with activity α = {a} at {f} GHz on {V} V.

::: part
answer: a*C*1e-15*V^2*f*1e9*1e6
unit: µW
tolerance: 0.5%

### What dynamic power does it take?

::: misses
- [any] $\alpha CV^2f$.
:::
:::

::: part
answer: C*V^2
unit: fJ
tolerance: 0.5%

### How much energy does one full charge-and-discharge cycle draw from the supply?

::: misses
- [any] $CV^2$.
:::
:::
:::

::: check
kind: parts
given: n = 2 | 3 | 4; r = 2 | 3

## In a process where a unit inverter has NMOS width 1 and PMOS width {r}, gates are sized to match it.

::: part
answer: n
tolerance: 0

### How wide is each NMOS in an {n}-input NAND?

::: misses
- [any] n in series.
:::
:::

::: part
answer: r*n
tolerance: 0

### How wide is each PMOS in an {n}-input NOR?

::: misses
- [any] n in series, each starting at the inverter's PMOS width.
:::
:::
:::

::: check
kind: parts
given: n = 2 | 3 | 4; r = 2 | 3

## Compare an {n}-input NAND and NOR sized to match a unit inverter (NMOS 1, PMOS {r}).

::: part
answer: n + r
tolerance: 0

### What total gate width does one NAND input drive?

::: misses
- [any] Its NMOS (width n) plus its PMOS (width r).
:::
:::

::: part
answer: 1 + r*n
tolerance: 0

### And one NOR input?

::: misses
- [any] Its NMOS (width 1) plus its PMOS (width rn).
:::
:::
:::

::: check
kind: parts
given: Ron = 1 | 5 | 20; fo = 2 | 4; Cin = 1 | 2; Cw = 1 | 5

## A gate with {Ron} kΩ of on-resistance drives {fo} inputs of {Cin} fF each and {Cw} fF of wire.

::: part
answer: fo*Cin + Cw
unit: fF
tolerance: 0.5%

### What is its load?

::: misses
- [any] Inputs plus wire.
:::
:::

::: part
answer: 0.69*Ron*1000*(fo*Cin + Cw)*1e-15*1e12
unit: ps
tolerance: 0.5%

### What is its 50% delay, $0.69RC$?

::: misses
- [any] $0.69R_{on}C$.
:::
:::
:::

::: check
kind: parts
given: VDD = 1.2 | 3.3 | 5; Vt = 0.3 | 0.8

## A matched CMOS inverter on {VDD} V has thresholds of {Vt} V.

::: part
answer: VDD/2
unit: V
tolerance: 0.5%

### Where does it switch?

::: misses
- [any] Matched: half the supply.
:::
:::

::: part
answer: (3*VDD + 2*Vt)/8
unit: V
tolerance: 0.5%

### What is its noise margin?

::: misses
- [any] $(3V_{DD} + 2V_t)/8$.
:::
:::
:::

::: check
kind: parts
given: A = 0 | 1; B = 0 | 1; C = 0 | 1

## A full adder gets A = {A}, B = {B} and carry-in {C}.

::: part
answer: A + B + C - 2*floor((A + B + C)/2)
tolerance: 0

### What is its sum bit?

::: misses
- [any] The low bit of A + B + C.
:::
:::

::: part
answer: floor((A + B + C)/2)
tolerance: 0

### What is its carry out?

::: misses
- [any] 1 when at least two inputs are 1.
:::
:::
:::

::: check
kind: boolean
vars: A, B, C, D
answer: ~A & ~C | A & C
ops: and, or, not

## Minimize $\sum m(0, 1, 4, 5, 10, 11, 14, 15)$.

::: misses
- [any] Two groups of four.
:::
:::

::: check
kind: boolean
vars: A, B, C, D
answer: ~B & ~D | B & D
ops: and, or, not

## Minimize $\sum m(0, 2, 5, 7, 8, 10, 13, 15)$.

::: misses
- [any] Corners and center.
:::
:::

::: check
kind: boolean
vars: A, B, C, D
answer: ~A & ~B & ~C & ~D | ~B & C & D | B & C & ~D | A & D
dontcare: 10, 11, 12, 13, 14, 15
ops: and, or, not

## A, B, C, D carry a BCD digit, so the codes 10 to 15 never occur. Minimize the function that's 1 when the digit is divisible by 3 (0, 3, 6 or 9).

::: misses
- [any] Use the don't-cares to make large groups.
:::
:::

::: check
kind: boolean
vars: A, B, C
answer: ~A | ~C
ops: and, or, not

## Find a minimal form of $\sum m(0, 1, 2, 3, 4, 6)$ (try grouping the zeros).

::: misses
- [any] The zeros are 5 and 7.
:::
:::

::: check
kind: boolean
vars: A, B, C
answer: ~(A & B | C)
ops: and, or, not

## A CMOS gate's pull-down network is NMOS A and B in series, in parallel with NMOS C. What does it compute?

::: misses
- [any] The pull-down conducts when AB + C is true.
:::
:::

::: check
kind: boolean
vars: S, A, B
answer: ~S & A | S & B
ops: and, or, not

## Design a 2:1 multiplexer: output A when S = 0 and B when S = 1.

::: misses
- [any] One term per value of S.
:::
:::

::: check
kind: boolean
vars: A, B, C, D
answer: ~B & ~D | B & D
ops: and, or, not

## Minimize $\sum m(0, 2, 5, 7, 8, 10, 13, 15)$ (A the top bit).

::: right
Right: $\bar B\bar D + BD$, the corners and the center.
:::

::: misses
- [any] Not yet. The four corners form one group.
:::
:::

::: check
kind: boolean
vars: A, B, C
answer: A & B | A & C | B & C
ops: and, or

## Write the three-input majority function.

::: right
Right: $AB + AC + BC$.
:::

::: misses
- [any] Not yet. It's 1 when at least two inputs are 1.
:::
:::

::: check
kind: parts
given: n = 2 | 3 | 4; N = 1e6 | 1e8

## A design uses {N} n-input NAND gates with n = {n}, each sized to match a unit inverter.

::: part
answer: n*n + 2*n
tolerance: 0

### What total transistor width does each gate use, in units?

::: misses
- [any] n NMOS n wide plus n PMOS 2 wide.
:::
:::

::: part
answer: (n + 2)/3
tolerance: 0.5%

### What's each gate's logical effort?

::: misses
- [any] $\frac{n + 2}{3}$.
:::
:::
:::
:::
