Digital Logic & Microprocessor — Digital Logic, NEC licence examination syllabus (Nepal Engineering Council).
Computers count in twos because a switch is either on or off — and everything else follows from that.
Inside a chip, everything is a switch. A switch is on or off — there is no reliable third position.
You could try to store ten different voltage levels in one wire, but they would drift with heat and age and noise, and 4 volts would get confused with 5. Two states are easy to keep apart: something or nothing.
So machines count in base 2, using only 0 and 1. That is not a design preference — it is the only counting system a switch can hold reliably.You already know this from decimal, even if nobody said it out loud. In 3407, the 3 is not worth three — it is worth three thousand, because of the column it sits in.
Binary is the same idea with different column values. Instead of each column being ten times the one to its right, each is twice.
Octal (base 8) and hexadecimal (base 16) exist for one reason: binary is unbearable to read. Eleven ones and zeros in a row is easy to miscopy, and one wrong digit is a different number entirely.
4 bits = 1 hex digitExactly. 16 is 2⁴, so every group of four bits becomes one hex character with no arithmetic at all.
Conversion is by sight1101 0110 becomes D6. Split into fours, convert each — no dividing, no remainders.
Octal is the same trickWith 3 bits per digit, because 8 is 2³. Less common now, but the same idea.
Straight conversionDecimal to binary, binary to hex, and back. Nearly free marks once the method is automatic.
Via binaryHex to octal is easiest through binary — go to bits, regroup, convert. Do not attempt it directly.
Check your answerConvert back. It takes ten seconds and catches almost every slip.
Create a free account to tick topics off, take notes as you read, watch the video lessons and get a day-by-day study plan built around your exam date.
Loading…