Digital Circuits
Numeration Systems
19 questions By Tony R. Kuphaldt
-
Question 1 of 19
Digital computers communicate with external devices through ports: sets of terminals usually arranged in groups of 4, 8, 16, or more (4 bits = 1 nybble, 8 bits = 1 byte, 16 bits = 2 bytes). These terminals may be set to high or low logic states by writing a program for the computer that sends a numerical value to the port. For example, here is an illustration of a micro controller being instructed to send the hexadecimal number F3 to port A and 2C to port B:

Suppose we wished to use the upper four bits of port A (pins 7, 6, 5, and 4) to drive the coils of a stepper motor in this eight-step sequence:
- Step 1:
- 0001
- Step 2:
- 0011
- Step 3:
- 0010
- Step 4:
- 0110
- Step 5:
- 0100
- Step 6:
- 1100
- Step 7:
- 1000
- Step 8:
- 1001
As each pin goes high, it drives a power MOSFET on, which sends current through that respective coil of the stepper motor. By following a “shift” sequence as shown, the motor will rotate a small amount for each cycle.
Write the necessary sequence of numbers to be sent to port A to generate this specific order of bit shifts, in hexadecimal. Leave the lower four bit of port A all in the low logic state.
Reveal answer- Step 1:
- 1016
- Step 2:
- 3016
- Step 3:
- 2016
- Step 4:
- 6016
- Step 5:
- 4016
- Step 6:
- C016
- Step 7:
- 8016
- Step 8:
- 9016
Follow-up question: write the same sequence in decimal rather than hexadecimal:
- Step 1:
- Step 2:
- Step 3:
- Step 4:
- Step 5:
- Step 6:
- Step 7:
- Step 8:
Notes:Although the root of this question is nothing more than binary-to-hexadecimal conversion, it also introduces students to the concept of controlling bit states in microcomputer ports by writing hex values. As such, this question is very practical!
In case students ask, let them know that a dollar sign prefix is sometimes used to denote a hexadecimal number. Other times, the prefix 0x is used (e.g., $F3 and 0xF3 mean the same thing).
-
Question 2 of 19
The numeration system we use in our daily lives is called base ten, also called decimal or denary. What, exactly, does “base ten” mean?
Given the following base-ten number, identify which digits occupy the “one’s place,” “ten’s place,” “hundred’s place,” and “thousand’s place,” respectively:
5,183 Reveal answer“Base ten” means that numbers are represented by combinations of symbols (ciphers), of which there are only ten (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9).
Analyzing the number 5,183:
- One’s place: 3
- Ten’s place: 8
- Hundred’s place: 1
- Thousand’s place: 5
Notes:The “base” of our numeration system is something people usually don’t think much about - it is simply taken for granted. The purpose of this question is to help students realize what numerical symbols actually mean, in preparation for understanding other systems of numeration.
-
Question 3 of 19
Observe the following sequence of numbers:
00
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
.
.
.
What pattern(s) do you notice in the digits, as we count upward from 0 to 21 (and beyond)? This may seem like a very simplistic question (and it is!), but it is important to recognize any inherent patterns so that you may understand counting sequences in numeration systems with bases other than ten.
Reveal answerNote the repeating sequence of digits in the one’s place, and the developing pattern of incrementation in the ten’s place. How many numbers may be counted without repeating digits in the one’s place?
Notes:Some students will think this question to be ridiculously simple, but there are some important lessons to be learned here. The greatest problem students face while learning binary, octal, and hexadecimal numeration systems is the overpowering familiarity with base-ten numeration. We are so accustomed to base-ten that we don’t bother to recognize its basic properties, and typically believe that this is the only way numbers may be written!
