1P3 Digital Circuits Flashcards

1
Q

How do you solve a circuit for a digital gate?

A

Plot the characteristic of the bottom item first, and plot the mirror of the top item starting from the supply voltage.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you work out the inverter characterstic for a resistor - NMOS combo?

A

By plotting resistor characterstics on top of the transistor one, and esting the Vds for different values of Vgs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How are NOR circuits designed?

A

two transistors in parallele.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How are NAND circuits designed?

A

two transistors in series.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What limits the speed in NMOS logic?

A

the parasitic capacitance between the output voltage and the ground. Can take up to 30ns.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How can transistors behave like resistors?

A

By connecting the gate to the drain so Vds = Vgs.
Leads to a resistance of around 900 ohms

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Advantages of using FET as a resistor?

A

Much smaller on the chip

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

When is power consumed in a resistor NMOS combo?

A

When Vin is high, there will be a current on the order of 10mA, large power dissapation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a CMOS inverter?

A

PMOS and NMOS in series. With drain adjacent to drain. Vin connected to the gate of both.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

List the advantages of CMOS logic.

A

Much better inverter characteristic closer to ideal, almost vertical at 5V.
Due to the nature of intersecting, charactersitics.

Much lower power dissapation, Only dissapated whilst the device is changing state.

Low propogation delay (8 - 50ns)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A + (A.C) =

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A.(A+C)=

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

A + (B.C…) =

A

(A+B).(A+C)…

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

A.(B+notB)=

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the quickest way to find an expression for Y in terms of sum of products? (Boolean algebra)

A

Write down an expression for Y directly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the quickest way to find an expression for Y in terms of product of sums?

A

find an expression for notY and use demorgans

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How to work out a circuit purely using NAND gates?

A

Write down the Karnaugh map and find the sum-of-products, the use De Morgan to convert this to a NAND based expression.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

How to work out a circuit purely using NOR gates?

A

Write donw simplest sum of products for the inverse of the ouput, use De Morgan to convert.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

How do you make a 5 variable Karnaugh map?

A

Place two 4 variable Karnaugh maps next to one another.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is a static 1 hazard.

A

When propogation delays of the logic gates result in in the output switching from 1 to 0 and then back to 1 due to a single change in input.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is static zero hazard.

A

When propogation delays of the logic gates result in in the output switching from 0 to 1 and then back to 0 due to a single change in input.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

How do you fix a static 1-hazard?

A

Drawing a Karnaugh map of the ouput and making sure all of the sums of products overlap.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

How do you fix a static 0-hazard?

A

Drawing a Karnaugh map of all the inverse of the ouputs, making sure all of the sums of products overlap.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is a dynamic hazard?

A

When a signal changes more than once when it’s supposed just to change once.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

What is unit distance codes?

A

Where only one bit changes at time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

For an 8 bit signed number, what set of numbers represents positive, and what set represents negative (in hex)?

A

Positive 00 - 7F
Negative 80 - FF

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Convert a positive number to a negative number how?

A

invert all the bits then add 1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

When does 2’s complement overflow?

A

When the carry into MSB is not equal to the carry out of MSB.

Deliberately ignoring carry out into MSB.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

What is Binary Coded Decimal?

A

When each digit of the decimal number is stored as one 4 bit segment.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

How many bits are used for Alphanumeric character codes?

A

7 bits, first 32 are control codes, rest are upper, lower case letters, numbers and punctuation.

8 bits for an extraa 128 graphics characters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

What is parity?

A

A form of error detection, sets a particular bit to ensure an even number of bits are always on. Can reject if there are an odd number of bits.
Can only detect 1 bit errors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

What is an S-R bistable?

A

A set reset bistable, simplest form.
Works except for the case S=R=1.

Q1 = S + not (Q2) = not(not(s).Q2)
Q2 = R + not(Q1) = not(not(R).Q1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

How does a gated SR bistable work?

A

Can only change state when the gate input is high.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

How does a master-slave gated s-r bistable work?
What is its symbol?

A

First bistable changes on the clock goes low, sensitive to the S-R inputs.

Second bistable changes on the rising edge of the next clock.

Output of second bistable is Q and not(Q)

s-r with a clock with a triangle.

35
Q

What are input and clear reffered to as?

A

asynchronous inputs.

36
Q

How does preset and clear work?

A

They are active low signals.

If preset goes low, the output goes high.

If clear goes low, the output goes low.

They are connected the NAND of the slave bistable.

37
Q

What is a D-type latch?

A

S = D
R = notD

for a master slave S-R bistable

38
Q

What is the difference between SR and JK?

A

J is anded with not(Q) before it goes to S.
i.e. S = J.not(Q)
R = K.Q

This prevents S=R=1. If J=K=1 this input triggers the ouput to toggle.

39
Q

How do you create a divide by 2 counter?

A

1 JK bistable where both J=K=1.

40
Q

How does a ripple counter work?

A

all J-K = 1, output of one is connected to the next.

41
Q

How does a shift register work?

A

A series of D type latches with outputs connected to the next input.

42
Q

How does parallel loading work?

A

A series of inputs connected via NAND gates and invertes to preset and clear. With a load wire which is set to one to load the numbers.
It is also a shift register so once the load is set to zerothe numbers can cycle out,

43
Q

What is a serial data link?

A

A parallel loading shift register followed by a single wire and then a shift register. Allows data to be transmitted with only one wire despite having many bits.

44
Q

What is a Johnson counter?

A

A shift register with the output connected via an inverter to the input. (or other logic functions).

Of length N generates a sequence of length 2N.

45
Q

How can divide by N counters be made where N is not a power of 2?

A

the clear function connected to the appropriate logic gates and the bistable outputs.

46
Q

What are the 5 stages to synchronous logic design?

A

State diagram, bistable allocation, state transition table, Karnaugh maps, circuit diagram.

47
Q

What are the two types of DAC?

A

Weighted resistor DAC, lots of different sizes of resistors. D type latches and a transimpedance amplifier.

48
Q

R-2R Ladder DAC

A

switches for all the inputs. R resistors accross the top and 2R down the branches. Each current is 2x the previous.
Also connected to a transimpedance amplifier.

49
Q

How does hysteresis work?

A

FOr the comparator to trigger, the input voltage has to exceed the upper bound to change state, and go below the lower bound to change state again.

50
Q

How does a flash ADC work?

A

A long potential divider used as many different Vref. Used to be a ladder.

Need 8 bits to convert 8 levels, ineffecient.

51
Q

How many comparators does a n bit ADC need?

A

2^n-1

REQUIRES LOADDDSSS takes up laods of space
Impossible for high resolution such as 16bit

52
Q

stair-step ramp method for ADC.

A

A divide by n counter (ramping up) is connected to a DAC which is connected with 1 comparator to an analogue input. Control logic is used to assign a digital value to this.

SLOW but few comparators.

53
Q

What are the inputs and outputs to an adder circuit?

A

Ai, Bi (two bits to be added), Ci (carry)

Output:

Ci+1 (carry to next bit), Si (result for that bit.
Can be stacked together.

54
Q

WHat is an ALU?

A

An arithmetic logic unit.

Takes in n bit inputs a and b (could be single bits or entire words).
Uses function code + carryin
Completes operation (add, subtract, and, or)
produces an outpu and carry out

55
Q

What buses are bidirectional and which ones are unidirectional?

A

Data bus is bidirectional (read/write)
Address and control bus are unidirectional.

56
Q

What steps are needed to read data from memory?

A

Set address on the address bus,
set read/write wire of control bus to high
set address vlid control wire high.

This activates chip select (active low signal), memory location is placed on data bus.

57
Q

What steps are needed to write to memory?

A

Set address on address bus
Set read/write wire to low
Set address valid control wire high.

Activiates the chip select. Contents of the data bus placed at memory location.

58
Q

Where is the input/output register on the PIC?

A

GPIO (bidirectional, apart from pin 3 which is always an input) pins 0-5

59
Q

How does the program counter work?

A

Total of 13 bits split over two memory locations. PCL and PCLATH.

Stores the program memory address for the next instruction to be executed.

60
Q

Where is the direction of the GPIO set?

A

On the TRISIO register.

61
Q

What is the fetch-decode-execute cycle?

A

Fetch the instruction from the address stored in the program counter.

Then decoded by the microprocessor.
Once decoded it is executed and the program counter is incremented so it contains the address of the next instruction.

62
Q

What does d specify in op codes.

A

The location of the destination. F (d=1), W(d=0)

63
Q

What does the word select line inside RAM do?

A

It selects an individual word to either read or write to.

64
Q

What does write enable to?

A

Enables the output of the S-R bistable to be modified.

65
Q

How does the data interface at the edge of the chip work?

A

Read write and chip select wire either enables the data out tri-state buffer, or enables the write enable wire enabling the S-R bistables to be edited.

66
Q

How do tri-state buffers work.

A

If E (enable) is 1 then the output matches the input, if E is 0 then the output is floating.

67
Q

How does the not(CS) wire work?

A

It takes the signal from the first N of the address wires (starting from the MSB) and uses logic functions to assign each chip.

68
Q

What is memory mapped input/output?

A

When read or not(write) is selected can decide whether the input is written to the data bus or the data bus is written to the output port.,

69
Q

What is the difference between SRAM and DRAM?

A

SRAM is static RAM which is simple, with good storage density , speeedy access, and low power consumption. Used for cache memories on motherboards.

DRAM is dynamic RAM. Has a very complex interface because it must have its contents refreshed continuously (forgets in milliseconds), consumes power even when not in use, slower than SRAM, very dense storage, used as main RAM for PC.

70
Q

What are other types of memory? (excluding RAMs)

A

ROM - Read only memory, set at manufacture, microprocessor cannot change.

EPROM - erasable programmable read only memory, can be programmed using higher voltage than microprocessor, can be erased using a UV light

FLASH memory - non volatile storage that can be electrically erased and reprogrammed.

71
Q

How do you extract a series of bits and the rest zeros from a word?

A

Using andwf with 1s set for the bits you want.

72
Q

After rlf what does c flag tell you?

A

Whether the number was positive or negative (if it was 2’s complement)

73
Q

What are the nibbles of a word?

A

bits 0-3 lower nibble
bits 4-7 upper nibble

74
Q

What is the digit carry flag?

A

Set if operation causes carry from bit 3

75
Q

What is the zero flag?

A

Set if the result of an operation is zero.

76
Q

What needs to be noted for adding two sixteen bit numbers?

A

Make sure you have considered whether the carry bit is 1 and increment one of the upper 8 bit numbers before final addition.

77
Q

What are boxes and diamonds used for in flow charts?

A

Boxes - actions
Diamonds - tests

78
Q

When does an operation take two clock cycles?

A

Operations affecting PC counter contents. goto call return

test branch instructions, operates a nop if the skip aspect is triggered.

79
Q

How does the FSR work?

A

the address is loaded into FSR.
Referencing INDF, refences the location reffered to by FSR

80
Q

How does the stack work?

A

Pushing adds a piece of data onto the top of the stack.
Popping removes a piece of data from the top of the stack.
Last in First out

81
Q

When is the stack used on the PIC microprocessor?

A

PC is pushed onto the stack when a subroutine is execute. So the program can go back to it.
Stack is popped when it returns

82
Q

What is a subroutine?

A

Discreete programme function can be jumped to using call.

83
Q

What happens when the reset pin is set to low?

A

The program counter is reinitialized to 0x0000

84
Q

How does the reset pin work?

A

In parallel with a capacitor which increases from 0V after the reset button is presed such that the micro-processor can restart in suitable time.