当前位置:网站首页>Representation of base and number 2
Representation of base and number 2
2022-07-28 20:20:00 【Good life experience Officer】
Learning notes :
Carry system : It is a counting method that uses a set of fixed symbols and unified rules to represent the size of numerical values .
base : The number of digits used in the number system
Position right : Represents the weight at different positions
Carry counting system
- Decimal system
Definition :10 An ordered number :0、1、2、3 …… 9 And a decimal symbol “."
usage : Add “ Dot into one “, Subtraction ” Take a step back “
Any decimal number can be expressed as a polynomial with a power based on ten
Binary system
Definition : Binary digital symbols ,0 and 1, The base number is 2
usage : On the two into one , take a temporary measure 2n
octal
Definition : have 8 A different number symbol 0、1、2…… 7, The base number is 8
usage : Every eight enters one. , take a temporary measure 8n
Hexadecimal
Definition : have 16 A different number symbol 0、1、2…… 9、A、B、C、D、E、F, The base number is 16
usage : Every 16 to one , take a temporary measure 16n
The representation of carry digits
Subscript marks :(1110)₂
The suffix letter indicates : Binary system (B)、 octal (Q)、 Decimal system (D)、 Hexadecimal (H)
Hexadecimal conversion
R Base number → Decimal system
The law of expansion by right : Find the sum of the product of each bit and its weight
Decimal system →R Base number
Integral part : Divide the base and take the remainder
The fractional part : Multiply by Radix to round
Binary system → 8、 ... and / Hexadecimal
Centered on the decimal point , Divide to the left and right 3/4 position , In the middle of the 0 Don't omit . If the highest / The lowest position is insufficient 3/4 position , Separately supplement 0 that will do
8、 ... and / Hexadecimal → Binary system
General eight / Each number in hexadecimal is expanded to 3/4 Bit binary number , The order of arrangement and the position of the decimal point remain unchanged , And remove the redundant at both ends 0
octal → Hexadecimal
Take binary as the bridge
Signed digits
Number of machines : Use in the machine , Number digitized with the sign
There are three representations of machine number : Original code , Inverse code , Complement code ( The length of the number of machines is limited by the word length )
Original code
- Definition : Numerical bits are expressed in absolute values ,0( Plus sign )、1( Minus sign ). The original code is the absolute value of digital symbol bits plus numbers
operation :
Same number : Add the values
Different sign : Compare the absolute value , Large number minus decimal , Finally, choose the appropriate symbol
Inverse code
- Definition : The value bits of positive and inverse codes are the same as the true value bits ( That is, the same as the original code ), The sign bit of negative inverse code remains unchanged , The rest is reversed
Complement code
- Complement allows the sign bit to directly participate in the operation , Simplify operations , It can be reduced to plus
Positive complement is the same as the original , A negative complement is a sign bit invariant , The rest is reversed , Finally add 1
When the calculation result does not exceed the range of the machine , The addition of complement is still complement , Complement subtraction and change addition operation , Symbol bits participate in operations ,
The representation of numbers
Fixed point representation
Fixed-point number : The decimal point position is fixed
Fixed point decimals : The position of the decimal point is after the sign digit , Before the highest order of the significant value part
- Set the word length of a machine 8 position , A sign bit
The maximum number of fixed-point decimals :0.1111 111 Minimum non-zero positive number :0.0000 001
The maximum number of fixed-point positive numbers :0111 1111 Minimum positive number :0000 0001
overflow
underflow : If the data is less than the minimum value that the fixed-point number can represent , Computer work 0 Handle
Overflow : When the data is greater than the maximum value that the fixed-point number can represent , The computer cannot express
Floating point number means
- The range of values represented by fixed-point numbers is small , And it is easy to overflow during operation , Therefore, real numbers are more represented in a way similar to scientific counting , Floating point numbers
General expression :F=M*2^p
Pure decimal M It's the mantissa , Precision of representation number ,P It's an order code , Determine the position of the decimal point , Represents the range of numbers
边栏推荐
- 数据挖掘(数据预处理篇)--笔记
- Scene thread allocation in MMO real-time combat games
- Raspberrypico serial communication
- [C language] print pattern summary
- C language - pointer
- 2. Floating point number, the difference between float and double in C language and how to choose them
- 进制及数的表示 2
- [C language] scanf format input and modifier summary
- Longest Palindromic Substring
- flask_ Mail source code error
猜你喜欢
![[C language] simulation implementation of strlen (recursive and non recursive)](/img/73/e92fe714515491f1ea366d6924c9ec.png)
[C language] simulation implementation of strlen (recursive and non recursive)

3、 Are formal and actual parameters in a programming language variables?

Digital filter design matlab

熊市下PLATO如何通过Elephant Swap,获得溢价收益?

How can Plato obtain premium income through elephant swap in a bear market?

WFST decoding process

XOR operation and its usage
![[C language] summary of methods for solving the greatest common divisor](/img/38/3a099948ebf51fd0da3076f71f9dad.png)
[C language] summary of methods for solving the greatest common divisor

C language - data storage

5. Difference between break and continue (easy to understand version)
随机推荐
C language array and bubble sort
The privatized instant messaging platform protects the security of enterprise mobile business
[C language] function
Wust-ctf2021-re school match WP
Solve flask integration_ Error reporting in restplus
[experiment sharing] CCIE BGP reflector experiment
C language - data type
弹出模态框
C语言简单实例 1
C language - question brushing column
zfoo增加类似于mydog的路由
WUST-CTF2021-re校赛wp
Solve the kangaroo crossing problem (DP)
Stories of Party members | Li qingai uses cartoons to drive farmers to increase income and become rich
[C language] summary of methods for solving the greatest common divisor
最大交换[贪心思想&单调栈实现]
Multi-Modal Knowledge Graph Construction and Application: A Survey
[C language] Hanoi Tower problem [recursion]
【CodeForces】Educational Codeforces Round 132 (Rated for Div. 2)
Theoretical knowledge of digital image (I) (personal analysis)