java int is 4 bytes, 32 bits. The value range of int is [-2^31——2^31-1], that is, [-2147483648-2147483647], for positive numbers , its complement is itself. For a negative number, its complement is the inversion of all the bits of the corresponding positive number plus one.
The value range of int is: -2^31——2^31-1, that is, -2147483648——2147483647
1 , for a positive number, its complement is itself.
2. For a negative number, its complement is the inversion of all the bits of the binary number corresponding to the positive number plus one.
3. The same operation is used to find the original code from the complement of a negative number (all bits are inverted by 1), which is the absolute value of the negative number.
int is 4 bytes, 32 bits.
10000000 00000000 00000000 00000000 is the complement code, the first bit is the sign bit, 1 represents a negative number, so
negates the remaining bits, the result is 1111111 11111111 11111111 11111111, after adding one It is 10000000 00000000 00000000 00000000
4, so the original code refers to -2^31=-2147483648
int’s value range is -2^31——2^31-1
Extended information
int is an instruction that sends an interrupt to the CPU.
The format is INT vec.
vec is the interrupt vector number, its value is 0~255. The CPU calls the corresponding interrupt routine of the kernel based on this vector number. The instruction operation is:
(SP)←(SP)-2, ((SP) 1:(SP))←(FR)
(IF)←0, (TF)← 0
(SP)←(SP)-2,((SP) 1:(SP))←(CS)
(SP)←(SP)-2,((SP ) 1: (SP)) ← (IP)
(CS) ← (vec*4 2), (IP) ← (vec*4)
related Free learning recommendations: java basic tutorial
The above is the detailed content of How many numbers does java int have?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver Mac version
Visual web development tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool