(2.1) Representation of numerical data
(2.1.3) Source code representation
(2.1.4) Complement notation
(2.1.5) Inverse notation
(2.1.6) Comparison and conversion of three kinds of machines
(2.2) Fixed-point representation and floating point representation of machine numbers
Carry counting
Convert any base to decimal
Decimal Integer The number is converted to base R
Decimal decimal to base R
Binary to base 2* N
log2R
(2.2.1) Fixed-point representation
1. Specify decimals
2. Fixed-point integer
Truth value and number of machines
conclusion
(2.2.2) Floating point representation
This section is the overview
The composition of floating point numbers
1. Representation range of floating point numbers
Examples:
Normalize floating point numbers
Normalization: Specifies that the highest digit of the mantissa must be a valid value (1 for binary).
- This is done in the following example
The left gauge
.
Floating-point operations generate overflows with left and right gauges
Normalization of source code and complement code
This section summarizes
(2.3) Representation of non-numerical data
(2.3.1) representation of characters and strings
1. ASCII character encoding
How are characters and strings represented in a computer? –> ASCII encoding.
- Encoding: The representation of characters in a set of binary codes according to certain rules.
ASCII
Encoding: It is one of the more popular methods of encoding.
ASCII codes
2. Storage of strings
(2.3.1) Representation of Chinese characters
1. International code of Chinese characters
2. Chinese character location code
3. Inside code of Chinese character machine
(2.3.1) Unified code
(2.6) Data verification code
(2.6.1) Parity check code
- Data check code: refers to data encodings that can detect or correct errors automatically.
- Any kind of code consists of code words.
- Code distance: The number of different bits of a digit corresponding to any two code words. For example code word
00
and11
The code distance of theta is theta2
.Code distance of > 1
The check code has error capability.- Increasing the code distance reasonably can improve the ability of error detection.
1. Parity concept
2. Simple parity
Examples:
3. Cross parity
Second,
2. 8421 yards
9<x<16
Add 6