Trace it.
Wire up AND, OR and NOT and watch the truth table fill itself, flip eight bits into denary and hex, then step a sort and count every comparison.
Wire it, then read the table
FIG. 01 · 2.4.1 · AND · OR · NOTQ = (A AND B) AND C
| A | B | C | A op B | Q |
|---|
A NOT gate is a triangle with a bubble. The bubble is the inversion — the triangle on its own is just a buffer.
What the exam wants. J277 section 2.4.1 only ever uses AND, OR and NOT, and the two things it asks for are: draw the logic diagram from an expression, and complete the truth table. Three inputs means eight rows — always eight, always in that counting order — and the fastest safe method is the middle column you can see here: work out the first gate for every row, then feed that into the second.
Eight switches, three languages
FIG. 02 · 1.2.3–1.2.4 · BINARY · DENARY · HEXFlip switches. Hex is only ever four bits at a time — split the byte down the middle and convert each half.
A left shift multiplies by two; anything pushed off the left-hand end is simply gone. That is overflow, and it is worth a mark.
What the exam wants. 1.2.4 asks for conversions in every direction and 1.2.3 for the units that sit on top of them. Denary from binary is just adding the column headings above the 1s. Hex from binary is four bits at a time — never eight. And when a shift is worth 3 marks, one of them is almost always for saying which bits were lost and what that does to the value.
Sort it, and count the cost
FIG. 03 · 2.1.3 · BUBBLE · INSERTION · MERGEChoose an algorithm and step it. The two highlighted bars are the pair being compared right now.
Every algorithm gets the same starting list, so the counters are a fair fight.
What the exam wants. 2.1.3 asks you to “show the list after each pass” and to say which algorithm you would choose and why. Bubble is the easiest to describe and the slowest to run; insertion does well on a list that is nearly sorted; merge splits until every list has one item and then does the work on the way back up. Run all three on the same list and the comparison counters make the answer for you.