Introduction I will write about the problem I saw two days ago in detail. byte We all know that computers are based on binary. The basic unit of storage is Bit, also called bit or binary bit. 1 bit can represent two numbers, 0 or 1, and is the smallest possible amount of information. Any content less than 1 bit is not considered information. Complex content must be represented by multiple bits. Byte, also known as byte, is often used as a unit of measurement. 1 byte is equal to 8 bits, that is, 1 byte can represent 28 contents. Bytes in MySQL First of all, let me explain that the integer type in MySQL can be divided into two types: unsigned and signed. The specific content will not be expanded here. The size of tinyint is 1 byte. The numbers that can be represented by signed type are shown in the following table. (Note: The table is modified according to the "Coding" and is only used as an example. It does not represent the actual storage of MySQL)
int maximum value As we can see in the table above, the first bit is used to represent the sign, so there is one less bit in sigend to store the content. Int is 4 bytes. Combining the above, we can conclude that the maximum value of int in signed form is
In unsigned, the first bit is not required to indicate the sign, so
References: binary, bit, byte, complement. Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. If you have any questions, you can leave a message to communicate. Thank you for your support for 123WORDPRESS.COM. You may also be interested in:
|
<<: Axios secondary encapsulation example Demo in the project
>>: CentOS 7.2 builds nginx web server to deploy uniapp project
Configure web page compression to save resources ...
Preface When we were writing the horse, I guess e...
When I used g++ to compile the cpp file for the f...
Preface In fact, the humble "!" has man...
1. The color of the scroll bar under xhtml In the ...
Table of contents Preliminary Notes Problem Repro...
When talking about the screen reading software op...
Table of contents 1. Docker enables remote access...
Scenario: When starting tomcat in docker (version...
In web projects we often use the timeline control...
Will UPDATE lock? Will the SQL statement be locke...
Table of contents 1. Create a socket 2. Bind sock...
Using Navicat directly to connect via IP will rep...
DIV+css structure Are you learning CSS layout? Sti...
This article shares the specific code of jQuery t...