Course 1 Acquisition and Treatment of Experimental Data 1. Introduction, Definitions, Concepts
Course 1 Acquisition and Treatment of Experimental Data 1. Introduction, Definitions, Concepts
Course 1 Acquisition and Treatment of Experimental Data 1. Introduction, Definitions, Concepts
Digital: 1. (About signals) whose value can be represented by a discontinuous function over
time, can take a finite number of values within its domain of variation. 2. (About devices,
instruments and systems) that generate, measure, process and store digital signals.
Hardware: The physical structure of a computing system or peripherals; the unit itself.
Software: System of programs (applications) that came with the computer or are developed
by user.
1
Course 1 Acquisition and treatment of experimental data
2
Course 1 Acquisition and treatment of experimental data
Binary system
The binary system is mostly used in the digital computing systems and is based exclusively
in the use of numbers 0 and 1 associated with increasing powers of 2. For example:
3
Course 1 Acquisition and treatment of experimental data
1 0 1 1
= 1 x 23 + 0 x 22 + 1 x 21 + 0 x 20 = (1011)2 = 1 x 8 + 0 x 4 + 1 x 2 + 1 x 1 = (11)10
Since the large numbers in binary representation involve the use of a large number of digits,
new numerical systems are developed, the most common being the octal system (based on the use
of numbers 0, 1, ..... 7) and the hexadecimal system (that uses the numbers from 0 to 9 and, for
numbers greater than 9, uses the symbols A, B, C , D, E and F.)
A suggestive comparison between different numerical systems is shown in Table 1.
Decimal Binary Octal Hexadecimal
0 0 0 0
1 1 1 1
2 10 2 2
3 11 3 3
4 100 4 4
5 101 5 5
6 110 6 6
7 111 7 7
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
In this context, we can define the term bit (short for “binary digit”, having the plural “bits”) ,
which is the fundamental unit of information (0 or 1, ON or OFF, TRUE or FALSE). Using a single
bit we can create only two distinct combinations (numbers, status ). The use of 2 bits allows the
composition of four distinct numbers :
(00)2 = (0)10; (01)2 = (1)10; (10)2 = (2)10; (11)2 = (3)10.
Generally, using a number of “n” bits we can write 2n distinct numbers. Relative to the
position of each bit in the binary number, we can define the notions of:
LSB ("Least Significant Bit"). Indicates the bit found on the right extremity and
corresponds (for integers) to the binary number 20;
MSB ("Most Significant Bit"). Indicates the bit from the left extremity and
corresponds (for integers) to the binary number 2n-1
To facilitate both writing numbers in binary and mutual transformation from/in binary, octal
and hexadecimal systems, the bits can be grouped as described below:
Nibble - Group of 4 bits;
4
Course 1 Acquisition and treatment of experimental data
Integers conversion
Conversion from any base in the decimal system
Considering the general case of a number of “k” digits write in the “b” base, the
corresponding value in the decimal system will be:
k
(Value )10 k i b i 1
i 1
98 64 ? Yes 98 – 64 = 34 1 (MSB)
34 32 ? Yes 34 – 32 = 2 1
2 16 ? No - 0
28? No - 0
24? No - 0
22 Yes 2–2=0 1
01 No 0 0 (LSB)
5
Course 1 Acquisition and treatment of experimental data
The method based on remainder evaluation after successive division by 2. The method can
be applied even for very large integer numbers and involve successive division by 2 of the
number and the corresponding resulting integers and evaluation of the remainders for each
step, as described in Figure 1.
Figure 1
6
Course 1 Acquisition and treatment of experimental data
value or up to the required precision for the conversion process. For example, the conversion of
the number 0.1910 with 9 bits resolution includes the next steps:
Step (i) N Operation Remainder z(i-1)
1 0.19 0.19 * 2 = 0.38 0.38 0
2 0.38 0.38 * 2 = 0.76 0.76 0
3 0.76 0.76 * 2 = 1.52 0.52 1
4 0.52 0.52 * 2 = 1.04 0.04 1
5 0.04 0.04 * 2 = 0.08 0.08 0
6 0.08 0.08 * 2 = 0.16 0.16 0
7 0.16 0.16 * 2 = 0.32 0.32 0
8 0.32 0.32 * 2 = 0.64 0.64 0
9 0.64 0.64 * 2 = 1.28 0.28 1
► Exercise: Calculate the absolute and relative error for the presented case.
7
Course 1 Acquisition and treatment of experimental data
Logic gates
Inverter (NOT)
A Ā
0 1
1 0
AND gate
A B A·B
0 0 0
0 1 0
1 0 0
1 1 1
OR gate
A B A+B
0 0 0
0 1 1
1 0 1
1 1 1
NAND gate
A B AB
0 0 1
0 1 1
1 0 1
1 1 0
NOR gate
A B AB
0 0 1
0 1 0
1 0 0
1 1 0
XOR gate
A B AB
0 0 0
0 1 1
1 0 1
1 1 0
XNOR gate
A B AB
0 0 1
0 1 0
1 0 0
1 1 1
1 bit half adder
A B SUM CARRY
0 0 0 0
1 0 1 0
0 1 1 0
8
Course 1 Acquisition and treatment of experimental data
1 1 0 1
A B CIN S COUT
0 0 0 0 0
1 0 0 1 0
0 1 0 1 0
1 1 0 0 1
0 0 1 1 0
1 0 1 0 1
0 1 1 0 1
1 1 1 1 1
9
Course 1 Acquisition and treatment of experimental data
Decoders
The decoders represent combinational logical circuits having, basically, “n” logical
inputs and 2n outputs. Depending on the logical input combination (and, in most cases, on the
enable input state), only one from the 2 n outputs is activated. As described in the example from
the Figure 3, using 2 inputs, 4 outputs can be activated independently when the “Enable” input is
active. Contrarily, when the “Enable” input is inactive, all the outputs are inhibited.
Figure 3. The symbol and the truth tables for a 2 bits decoder with Enable input.
10
Course 1 Acquisition and treatment of experimental data
The multiplexers present “n” logical control inputs, 2n data inputs and one output.
Depending on the logical combination applied to the control inputs, the data presented to the
corresponding input is transferred to the output as in the example presented in Figure 5.
The digital multiplexers can be easily designed using a “n” bits decoder coupled to 2n
AND gates having the outputs connected to an 2n inputs OR gate.
Similarly, the demultiplexers present “n” logical control inputs, one data input and 2n data
outputs. Depending on the logical combination applied to the control inputs, the data presented
to the D input is transferred to the corresponding output (F0 – F2n-1) as in the example presented
in Figure 6.
For more detailed information, see (from the "Biblio_ATED_2017-2018"folder) the file “C02 A
Practical Introduction to Computer Architecture.pdf”, pages: 23-40, 48-50, 63-65 and 67-71.
11
Course 1 Acquisition and treatment of experimental data
12
Course 1 Acquisition and treatment of experimental data
1. Identify the main controls, indicators and operators used for numerical and boolean
data.
o 2 bits multiplexer;
o 2 bits demultiplexer;
13