Machine Structure 1 - Course Notes
Machine Structure 1 - Course Notes
Dr Benabderrezak
Researcher in Cyber Security
Full-stack Web developer 1
Work Plan
1. Introduction
2. Numeration Systems
4. Boolean Algebra
2
1. Introduction
- The aim of this course notes is to present and deepen the concepts
3
2. Numeration System
- Numeration System, or number systems, is a method of representing
4
2. Numeration System
5
2. Numeration System - Passing between different bases
6
2. Numeration System - base 8 to base 10
7
2. Numeration System - base 10 to base 2
8
2. Numeration System - Passing between different bases
9
2. Numeration System - Arithmetic operation in Binary base
10
10
2. Numeration System - Arithmetic operation in Binary base
11
11
2. Numeration System - Arithmetic operation in Binary base
12
12
2. Numeration System - Arithmetic operation in Binary base
13
13
2. Numeration System - Arithmetic operation in Binary base
14
14
3. The representation of information
3.1. Binary coding system
2. Gray code
4. Excess-3 code
15
15
1. Pure Binary Coding : is the basic numerical system in which each
16
16
2. Gray code : is a type of binary encoding where two consecutive values
17
17
3. Binary coded decimal (BCD) : is a type of encoding where each
18
18
19
19
4. Excess-3 code : is a type of encoding where each decimal digit is
20
20
3. The representation of information
3.2. Character representation
1. EBCDIC
2. ASCII
3. UTF code
21
21
1. EBCDIC : is an 8-bit character encoding used mainly on IBM
22
22
2. ASCII : is a 7-bit character encoding standard used widely in
23
23
3. UTF code : is a variable-length character encoding for Unicode,
24
24
3. The representation of information
3.3. Integers
1. Unsigned representation.
25
25
1. Unsigned representation
value.
26
26
2. Representation with sign and absolute value
Represents integers using one bit for the sign (0 for positive, 1 for
27
27
3. Complement to 1 (or Restricted Complement)
ﯾﻤﺜﻞ اﻷﻋﺪاد اﻟﺼﺤﯿﺤﺔ اﻟﺴﺎﻟﺒﺔ ﻋﻦ طﺮﯾﻖ ﻋﻜﺲ ﺟﻤﯿﻊ أﺟﺰاء اﻟﺘﻤﺜﯿﻞ اﻟﺜﻨﺎﺋﻲ ﻟﻠﻨﻈﯿﺮ اﻟﻤﻮﺟﺐ
28
28
4. Complement to 2 (or Complement True)
29
29
3. The representation of information
3.4. Fractional numbers
1. Fixed comma
30
30
1. Fixed comma :
number of digits before and after the decimal (or binary) point.
31
31
To convert a number with a fixed decimal (fixed-point) to another base
32
32
1. Convert the Integer Part
● Divide the integer part by the base 𝑏 and record the remainders.
base 𝑏
33
33
2. Convert the Fractional Part
● Multiply the fractional part by the base bbb.
● Use the fractional part of the result for the next multiplication.
34
34
35
35
2. Floating point (IEEE 754 standard) :
- The IEEE 754 standard defines formats for single and double
precision
36
36
2. Floating point (IEEE 754 standard) :
37
37
2. Floating point (IEEE 754 standard) :
38
38
To convert a number from any base to the IEEE 754 :
1. Convert the number to decimal.
2. Convert the decimal number to binary.
3. Normalize the binary number.
4. Determine the sign bit.
5. Calculate the exponent and encode it with bias (127 in
simple precision; 1023 in double precision )
6. Extract the mantissa.
7. Assemble the IEEE 754 representation. 39
39
Example : to convert 16,675 from decimal to IEEE 754 (simple precision)
40
40
4. Boolean Algebra
- Boolean algebra is a branch of algebra that deals with boolean values,
programming.
41
41
4. Boolean Algebra - Basic operations
42
42
4. Boolean Algebra - Basic operations
43
43
4. Boolean Algebra - Basic operations
44
44
4. Boolean Algebra - Basic Laws and Properties
45
45
4. Boolean Algebra - Basic Laws and Properties
46
46
4. Boolean Algebra - Basic Laws and Properties
47
47
4. Boolean Algebra - Basic Laws and Properties
48
48
4. Boolean Algebra - Basic Laws and Properties
49
49
4. Boolean Algebra - Basic Laws and Properties
50
50
4. Boolean Algebra - Basic Laws and Properties
51
51
4. Boolean Algebra - Basic Laws and Properties
52
52
4. Boolean Algebra - Basic Laws and Properties
53
53
4. Boolean Algebra - Truth table
- F = m (0,1,2,5,6,7,8,10,11,13)
54
54
4. Boolean Algebra - 1FN
- F = m (0,1,2,5,6,7,8,10,11,13)
55
55
4. Boolean Algebra - 2FN
- 2FN is derived from the maxterms (the complement of the minterms
- For this function, it includes the maxterms M(3, 4, 9, 12, 14, 15):
56
56
4. Boolean Algebra - Karnaugh Method
- A Karnaugh map (K-map) is a graphical representation of Boolean functions.
57
57
4. Boolean Algebra - Karnaugh Method
Karnaugh maps are essential because they allow for:
58
58
4. Boolean Algebra - Karnaugh Method Simplification
59
59
4. Boolean Algebra - Karnaugh Method Simplification
60
60
4. Boolean Algebra - Karnaugh Method Simplification
61
61
4. Boolean Algebra - Karnaugh Method Simplification
62
62
4. Boolean Algebra - Karnaugh Method Simplification
63
63
4. Boolean Algebra - Karnaugh Method Simplification
Another example :
https://www.youtube.com/watch?v=C4yvadVl8ho
64
64
4. Boolean Algebra - Quine-McCluskey Algorithm
https://www.youtube.com/watch?v=HYdQhyOsg70
65
65
4. Boolean Algebra - Implementation of the logic diagram
67
67
4. Boolean Algebra - Implementation of the logic diagram
A Buffer is a logic Gate that has only one Input, its Output follows the
68
68
4. Boolean Algebra - Implementation of the logic diagram
69
69
4. Boolean Algebra - Implementation of the logic diagram
70
70
4. Boolean Algebra - Implementation of the logic diagram
71
71
4. Boolean Algebra - Implementation of the logic diagram
72
72
4. Boolean Algebra - Implementation of the logic diagram
73
73
4. Boolean Algebra - Implementation of the logic diagram
74
74
4. Boolean Algebra - Study of some usual combinatorial circuits
75
75
4. Boolean Algebra - Adder
- An additionator is a circuit capable of summing two binary numbers A
and B.
- An addition implements two outputs:
● The sum, usually denoted S,
● The hold, usually R (or C: carry).
76
76
4. Boolean Algebra - Adder
- As in decimal, we must take into account the possible deduction,
result from a previous calculation.
- The following figure shows the decomposition of the addition of two
4 bit binary numbers
77
77
4. Boolean Algebra - The half-adder (2 bits)
It is a 2 bit additionator without taking into account the previous deduction
78
78
4. Boolean Algebra - The full-Additionator (2 bits)
It has three inputs A, B and Re and two outputs S and Rs: Re represents the
hold of rank n-1 and Rs that of rank n
79
79