Electronics Forum > Electronic connection

Digital 101, digital numbering systems,

(1/2) > >>

Lazarus:
Digital numbering systems,

in Digital electronics, one of the first things one needs to understand is the numbering systems used, so in this thread I will briefly explain a few of them,

one numbering system that we all should be familiar with is called decimal, I think we all know how the decimal numbering system works, but for reference and just to be thorough i'm going to cover it anyway,

Decimal:
in decimal a single digit can represent one of 10 possible values beginning with 0 and ending with 9, the first digit advances from 0 through 9 before the next digit advances, this is called base 10, or decimal, here is an example using 2 digits,

00
01
02
03
04
05
06
07
08
09
10

up next: Binary,

Discussion area for this thread is here: http://gokarters.com/smf/index.php?topic=2437.0

Lazarus:
Binary:

in Binary, each digit has only two possible values, 0 and 1, the first digit goes from 0 to 1, before the next digit advances, Binary can have any number of digits although it is usually limited to 8, and these digits are often called bits, this is called base 2, or binary, here is an example using 4 digits, or 4 bit binary,

0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111

At this point I think it prudent to mention that, a 1 is usually equal in voltage to the power supply voltage supplied to the system, and a 0 is equal to ground potential or 0v, in most CB Radios the PLL system is powered by +8Vdc, therefore in such a system, a 1 = 8v, and a 0 = 0v,

Lazarus:

in hexadecimal, each digit has 16 possible values, beginning with 0 as the lowest possible value, and ending with F as the highest possible value, each alphanumeric digit is used to represent 4 bits of binary code, this is called base 16, or Hexadecimal, or simply Hex, here is an example using 2 digit hexadecimal to represent 8 bit binary, counting from 00 to 20 in hex,

0000,0000 = 00
0000,0001 = 01
0000,0010 = 02
0000,0011 = 03
0000,0100 = 04
0000,0101 = 05
0000,0110 = 06
0000,0111 = 07
0000,1000 = 08
0000,1001 = 09
0000,1010 = 0A
0000,1011 = 0B
0000,1100 = 0C
0000,1101 = 0D
0000,1110 = 0E
0000,1111 = 0F
0001,0000 = 10
0001,0001 = 11
0001,0010 = 12
0001,0011 = 13
0001,0100 = 14
0001,0101 = 15
0001,0110 = 16
0001,0111 = 17
0001,1000 = 18
0001,1001 = 19
0001,1010 = 1A
0001,1011 = 1B
0001,1100 = 1C
0001,1101 = 1D
0001,1110 = 1E
0001,1111 = 1F
0010,0000 = 20

At this point I think it prudent to note that, 1 hexadecimal digit is commonly called a nibble, and pairs of 2 hexadecimal digits are commonly called a Byte,

up next: BCD, or Binary Coded Decimal,

Lazarus:
BCD, or Binary Coded Decimal:

in BCD, 4 binary digits or bits represent a single decimal digit, and 4 more binary digits or bits are required for the next decimal digit, and 4 more for the next and so on, it is almost like hexadecimal except the binary values higher than 9 representing A through F for any given digit are either ignored, or considered illegal or garbage, or skipped entirely, because in decimal a single digit does not go any higher than 9, here is a short example of 2 digit BCD counting from 00 to 20,

0000,0001 = 01
0000,0010 = 02
0000,0011 = 03
0000,0100 = 04
0000,0101 = 05
0000,0110 = 06
0000,0111 = 07
0000,1000 = 08
0000,1001 = 09
0001,0000 = 10
0001,0001 = 11
0001,0010 = 12
0001,0011 = 13
0001,0100 = 14
0001,0101 = 15
0001,0110 = 16
0001,0111 = 17
0001,1000 = 18
0001,1001 = 19
0010,0000 = 20

now to give some contrast here, the channel selector in a cobra 29 LTD Classic uses 1 and 1/2 digit BCD for its channel code going into the PLL chip, whereas in a typical EPT 3600-xxx chassis like the galaxy 33, and practically every other radio using an MC145106 PLL chip, its channel selector uses 8 bit binary for its channel code, and the two are not interchangeable, BCD and Binary are two very different numbering systems,

Lazarus:
To further illustrate the difference between Binary and BCD,

the truth chart on the left shows the BCD encoding that the channel selector sends to the PLL chip on a cobra 29 LTD,

the truth chart on the right shows the Binary encoding that the channel selector sends to the adder chips in a typical EPT 3600-xxx chassis,

Notice that the one on the left uses perfect in order 1 and 1/2 digit BCD encoding with no skips beginning with 00 at channel 40 and ending with 39 at channel 39, and the mess with the skipped RC channels, and the tangled up mess between channel 22 and 26 is all handled by the PLL chips internal ROM,

:)