Professional Documents
Culture Documents
Training Manual
Sep04 / THTT
Copyright by SR Technics Switzerland
Cat: B2
5.2 - 1
Basic Maintenance
Training Manual
Introduction
Note:
General
In the aeronautical world switching circuits of one kind or another are to be found
in almost every piece of electronic equipment ranging from ground radar systems,
aircraft navigation and flight systems and communications equipment. The switching systems may be relatively simple or quite complex, incorporating many interrelated circuits in the form of 'gates', 'logic circuits' and digital computer units.
It is necessary to understand the numbering system on which these circuits operate and to be able to interpret indications which may display those numbering system symbols (digits and letters). We shall first look at the various numbering
systems, which are used:
Decimal
Binary
Octal
Hexadecimal
Each numbering system will be examined for its structure and conversion to other
systems.
12310
11110112
1738
B716
Sep04 / THTT
Copyright by SR Technics Switzerland
Cat: B2
5.2 - 2
Basic Maintenance
Training Manual
Decimal System
Notes:
General
In this system the base is 10. Consider the number 724510.
This is stated as seven thousand, two hundred and forty five.
Written in its full form it becomes:
(7 x 103) + (2 x 102) + (4 x 101) + (5 x 100).
The 103, 102, 101 and 100 are 'understood' but each of them is prefixed by the appropriate coefficient, in this case 7, 2, 4 and 5. It can therefore be seen that each
power of 10 can have a coefficient ranging from 0 to 9, again ten digits.
Sep04 / THTT
Copyright by SR Technics Switzerland
Cat: B2
5.2 - 3
Basic Maintenance
Training Manual
Binary Numbering System
General
A decimal number, when written down, does not have the base numbers 100, 101,
102 etc. included but are 'understood' to be there. Furthermore the coefficient of
each power of ten ranged from 0 to 9.
In a binary number the base numbers (power of two) 20, 21, 22, etc. are not shown
- similar as within decimal numbers - and the coefficient of each base number can
only be 0 or 1.
To explain this the binary number 1 1 0 1 0 1 is illustrated in the top row of the table
below, underneath of each binary digit is written its base number (power of two)
and in the last row of the table appears the decimal weight of each column.
1
2
32
16
+0
+4
+0
MSB
Binary Number
13
26
53
Note:
Base
Number
A binary number can have 0's placed in front of the first 1 (left-most digit) of the
number without altering its decimal value.
Decimal
Weight
It should also be noted that the first (left-most) digit of a binary number is called
'MSB (Most Significant Bit) and the last (right-most) digit is called 'LSB (Least
Significant Bit). The word 'bit' comes from the first two letters of binary and last
letter of digit. The MSB and LSB may also be called MSD and LSD (..D = digit).
+1
= 53
Apropos, as shown in the table below with the binary equivalent of 16310, four bits
make a Nibble and two Nibbles, or eight bits, make a Byte. These groupings are
useful when converting to hexadecimal notation, which is explained later.
16310
Note that 20 equals 1 which is true for any number having an index of 0.
This is one way in which any binary number can be converted into its equivalent
decimal number. This system is acceptable for small binary numbers, i.e., numbers with a small number of 0's and 1's but becomes tedious when having to deal
with large binary numbers.
101000112
Under these circumstances it is better to use the following successive multiplication technique to convert a binary number to a decimal.
Sep04 / THTT
Copyright by SR Technics Switzerland
LSB
Multiply the most significant digit (the left-most digit) by 2 (base or radix).
Add the following binary digit of the binary number to this first product then
multiply by 2 again.
Add the next digit to this product then multiply by 2 again. This procedure continues until the least significant digit is added to the products generated, at this
point the conversion is completed.
Binary
Number
32
128
+0
+32
+0
+0
+0
+2
+1
27
26
25
24
23
22
21
20
MSB
LSB
Cat: B2
5.2 - 4
Basic Maintenance
Training Manual
Conversion of a Decimal Number to its Binary Equivalent
Notes:
Since the binary number system is the only one which a digital computer recognises, it is necessary to convert decimal numbers into their binary form.
To convert from decimal to binary, successive division by 2 may be employed and
the remainder of any division (which must be either 0 or 1) is then recorded successively in a separate column. The division by 2 is continued until the number being divided yields an answer of 0 with a remainder of 1.
The binary number equivalent of the original decimal number is then taken as the
sequence of remainders reading from the bottom upwards. Clearly, since the last
divis.
The following is an example of how this conversion is carried out:
Write the decimal number 217 in binary form.
2
217
Remainders
108
54
27
13
LSB
MSB
Read up to
obtain binary
equivalent:
11011001
i.e.
21710 = 110110012
Sep04 / THTT
Copyright by SR Technics Switzerland
Cat: B2
5.2 - 5
Basic Maintenance
Training Manual
Octal Numbering System
The successive multiplication technique in converting an octal number to its decimal equivalent is shown in the table below with the well-known octal number 236.
General
As the name implies, the octal system is a base 8 system, using the symbols 0, 1,
2, 3, 4, 5, 6 and 7. The weight factors are now powers of eight, such as 80, 81, 82,
etc. and the coefficient of each base number can be in the range of 0 to 7.
To explain this the octal number 236 is illustrated in the top row of the table below,
underneath of each octal digit is written its base number (power of eight) and in the
last row of the table appears the decimal weight of each column.
2
Octal
Number
82
81
80
Base
Number
64
Decimal
Weight
+6x1
16
19
158
To convert the above octal number 236 to decimal form, the decimal weights of
each of the base numbers having a coefficient of 1 to 7 have to be multiplied by
the respective octal digit of the octal number and are added together giving:
+3x8
Octal Number
Example:
2 x 64
796
Remainders
99
12
= 158
Multiply the most significant digit (the left-most digit) by 8 (base or radix).
Add the following octal digit of the octal number to this first product then multiply by 8 again.
Add the next digit to this product then multiply by 8 again. This procedure continues until the least significant digit is added to the products generated, at this
point the conversion is completed.
LSD
MSD
Read up to
obtain octal
equivalent:
1434
Another method to convert an octal number to its decimal equivalent is the successive multiplication technique.
Sep04 / THTT
Copyright by SR Technics Switzerland
i.e.
79610 = 14348
Cat: B2
5.2 - 6
Basic Maintenance
Training Manual
Conversion of an Octal Number to its Binary Equivalent
Notes:
This octal number 1434 will now be converted to its binary equivalent which is accomplished by taking each octal digit and converting it to a three-bit group as follows:
1
Octal Number
001
100
011
100
3-Bit Groups
110
011
3-Bit Groups
Octal Number
Sep04 / THTT
Copyright by SR Technics Switzerland
Cat: B2
5.2 - 7
Basic Maintenance
Training Manual
Hexadecimal Numbering System
General
This system is used mainly on those systems handling large binary numbers and,
as with the octal system, it is used as a shorthand method of writing binary numbers. This system uses a base of 16.
However, since only ten different digit symbols exist (0 to 9), six other symbols
have to be used for the complete range of coefficients of each power of 16. These
are the letters A to F inclusive of the alphabet. The complete set of hexadecimal
symbols of each base number (160, 161, 162, etc.) is now:
0
...
Hexadecimal
Symbols
...
10
11
12
13
14
15
Decimal
Weight
To explain this the hexadecimal number 1A3 is illustrated in the top row of the table
below, underneath of each hexadecimal symbol is written its base number (power
of 16) and in the last row of the table appears the decimal weight of each column.
1
Hexadecimal
Number
162
161
160
Base
Number
256
16
Decimal
Weight
+ 10 x 16
+3x1
Add the following hexadecimal symbol of the hexadecimal number to this first
product then multiply by 16 again.
Add the next symbol to this product then multiply by 16 again. This procedure
continues until the least significant symbol of the hexadecimal number is added to the products generated, at this point the conversion is completed.
The successive multiplication technique in converting a hexadecimal number to its
decimal equivalent is shown in the table below with the well-known hexadecimal
number 1A3.
Hexadecimal Number
16
26
419
We recognize that similar methods - as within the octal system - can be used to
convert hexadecimal to decimal and we will see, also vice versa from decimal to
hexadecimal or the conversions between hexadecimal and binary are performed
in a similar way to the octal system.
= 419
16
762
16
47
1010
= A
16
1510
= F
210
The table above illustrates the conversion of the hexadecimal number 1A3 to decimal form: The decimal weights of each of the base numbers having a coefficient
of 1 to 9 or A to F have to be multiplied by the respective hexadecimal symbol of
the hexadecimal number and are added together.
Sep04 / THTT
Copyright by SR Technics Switzerland
Remainders
Cat: B2
5.2 - 8
Basic Maintenance
Training Manual
Read up to
obtain
hexadecimal
equivalent:
2FA
Consider the conversion of the decimal number 1254 into the 3 numbering systems, they are:
Binary100111001102,
Octal 23468,
Hexadecimal4E616.
This conversion is carried out in the same way as for octal to binary except now
each hexadecimal symbol is given its equivalent binary number as a group of 4.
It can be seen that for ease of use the hexadecimal is best, the octal next and the
last are binary.
i.e.
76210
2FA16
Hexadecimal Number
0010
1111
1010
4-Bit Groups
1110
0101
4-Bit Groups
Hexadecimal Number
Sep04 / THTT
Copyright by SR Technics Switzerland
Cat: B2
5.2 - 9
Basic Maintenance
Training Manual
The table shown below illustrates the relationship between decimal, binary, octal
and hexadecimal numbers.
Decimal
Binary
Octal
Hexadecimal
Numbering System
101
100
24
23
22
21
20
81
80
161
160
Base Number
10
16
16
Decimal Weight
Sep04 / THTT
Copyright by SR Technics Switzerland
Cat: B2
Note:
To obtain the octal number
digits, the equivalent binary
number has to be divided in
3-bit groups and to obtain
the hexadecimal number
symbols (digits and/or letters) the equivalent binary
number has to be divided in
4-bit groups, always starting from the LSB (20).
5.2 - 10
Basic Maintenance
Training Manual
Binary Coded Decimal (BCD)
A binary number system representation is the most appropriate form for internal
computations since there is a direct mathematical relationship for every bit in the
number. To interface with a user - who usually wants to see I/O (Input/Output) in
terms of decimal numbers - other codes are more useful. The Binary Coded Decimal (BCD) system is the simplest and most widely used form for inputs and outputs of user-oriented digital systems.
In the Binary Coded Decimal (BCD) system, each decimal digit is expressed as a
corresponding 4-bit binary number. In other words, the decimal digits 0 to 9 are
encoded as the bit strings 0000 to 1001. To make the number easier to read, a
space is left between each 4-bit group. For example, the decimal number 163 is
equivalent to the BCD number 0001 0110 0011, as shown in the following table:
BCD
Decimal
______________
______________
______________
23
23
23
22
21
20
22
21
20
22
21
20
22 + 21
21 + 20
20
A generic code could use any n-bit string to represent a piece of information. BCD
uses 4 bits because that is the minimum needed to represent a 9. All four bits are
always written, even a decimal 0 is written as 0000 in BCD.
The important difference between BCD and the previous number systems is that,
starting with decimal 10, BCD loses the standard mathematical relationship of a
weighted sum. Instead of using the 4-bit code strings 1010 to 1111 for decimal 10
to 15, BCD uses 0001 0000 to 0001 0101. There are other n-bit decimal codes in
use (see next column).
BCD is the simplest way to convert between decimal and a binary code. Thus it is
the ideal form for I/O interfacing. The binary number system, since it maintains the
mathematical relationship between bits, is the ideal form for the computers internal computations.
Binary
Gray
2 out of 5
0000
0000
10010
0001
0001
00011
0010
0011
00101
0011
0010
00110
0100
0110
01010
0101
0111
01100
0110
0101
10100
0111
0100
11000
1000
1100
01001
1001
1101
10001
Sep04 / THTT
Copyright by SR Technics Switzerland
Cat: B2
5.2 - 11
Basic Maintenance
Training Manual
ASCII-Code
Table 1:
To get information into and out of a computer, we need more than just numeric representations; we also have to take care of all the letters and symbols used in dayto-day processing. Information such as names, addresses, and item descriptions
must be input and output in a readable format. But remember that a digital system
can deal only with 1s and 0s. Therefore, we need a special code to represent all
alphanumeric data (letters, symbols, and numbers).
Bits
6-4 >
000
001
010
011
100
101
110
111
3-0 >
0000
NUL
DLE
SP
0001
SOH
DC1
0010
STX
DC2
"
0011
ETX
DC3
0100
EOT
DC4
0101
ENQ
NAK
0110
ACK
SYN
&
0111
BEL
ETB
'
1000
BS
CAN
1001
HT
EM
1010
LF
SUB
1011
VT
ESC
1100
FF
FS
<
1101
CR
GS
1110
SO
RS
>
1111
SI
US
DEL
Most industry has settled on an input/output (I/O) code called the American Standard Code for Information Interchange (ASCII). The ASCII code uses 7 bits to represent all the alphanumeric data used in computer I/O. Seven bits will yield 128
different code combinations, as listed in Table 1.
Each time a key is depressed on an ASCII keyboard, that key is converted into its
ASCII code and processed by the computer. Then, before outputting the computer
contents to a display terminal or printer, all information is converted from ASCII
into standard English.
To use the table, place the 4-bit group in the least significant positions and the 3bit group in the most significant positions.
Sep04 / THTT
Copyright by SR Technics Switzerland
Cat: B2
5.2 - 12
Basic Maintenance
Training Manual
Summary
ACK
acknowledge
FF
form feed
BEL
bell
FS
file separator
BS
backspace
GS
group separator
CAN
cancel
HT
horizontal tab
CR
carriage return
LF
line feed
DC1
device control 1
NAK
negative acknowledge
DC2
device control 2
NUL
null
DC3
device control 3
RS
record separator
DC4
device control 4
SI
shift in
DEL
delete
SO
shift out
DLE
SOH
start of heading
ENQ
enquiry
SP
space
EM
end of medium
STX
start of text
EOT
end of transmission
SUB
substitute
ESC
escape
SYN
synchronous idle
ETB
US
unit separator
ETX
end of text
VT
vertical tab
Sep04 / THTT
Copyright by SR Technics Switzerland
1.
2.
The binary numbering system is used in digital systems because the 1s and
0s are easily represented by ON or OFF transistors, which output for example
0V for 0 and 5V for 1.
3.
4.
The weighting factor of the least significant digit in any numbering system is
always 1.
5.
6.
The successive-division procedure can be used to convert from decimal to either binary, octal, or hexadecimal.
7.
The binary-coded-decimal system uses groups of 4 bits to drive decimal displays such as those in a calculator.
8.
Cat: B2
5.2 - 13
Basic Maintenance
Training Manual
Sep04 / THTT
Copyright by SR Technics Switzerland
Cat: B2
5.2 - 14