Tag:Complement code
-
Time:2020-10-31
introduce First, let’s look at a program and print it separately4and-4The reverse operation result of, code: public static void main(String[] args) { System.out.println(~4); System.out.println(~(-4));} Think about the results. If the results are – 4 and 4, please continue to look 187MFUkJ Yes, the results are – 5 and 3 (not as simple as the opposite number). Here we tell a universal formula […]
-
Time:2020-10-11
Preface – overview of strlen I accidentally scan the code in glibc strlen. C, and I can’t forget it for a long time Programming is not a joke, some difficult, but also some reluctant. And strlen seems to be still in the school age, still so green and attractive~ /* Copyright (C) 1991-2020 Free Software […]
-
Time:2020-10-5
Data types in Java can be divided into two categories: basic data types and reference data types Basic data type Integer type byte Byte type is a byte, 8-bit, signed integer represented by binary complement; The minimum value is – 27(- 128) with a maximum of 27-1 (127), the default value is 0; Byte type […]
-
Time:2020-8-3
J2SE(Java 2 Platform Standard Edition) J2ME(Java 2 Platform Micro Edtion) J2EE(Java 2 Platform Enterprise Edition) Java language features: open source cross platform (JVM), object-oriented, etc JRE and JDK JRE (JVM and jjava Class Library) JDK contains JDK, as well as other development tools Java source code — > javac compilation — > […]
-
Time:2020-3-14
When learning C + + variable types, I suddenly want to deeply explore the memory structure of each typeSo, he turned his attention to JSThat’s because… Arraybuffer typearray these APIs are simply customized for my study!ECMA, you are so close Target is int integerIt’s said that he’s a 32-bit complementUse his scalpel to see what-1 […]
-
Time:2020-2-6
Do you really understand negative numbers in Java? From http://blog.csdn.net/candyguy 1、 How to code negative numbers in Java? Java uses “two’s complement” to encode negative numbers. It is a numerical encoding method, which needs to be completed in two steps: first, each binary bit takes the opposite value, 0 becomes 1, 1 becomes 0. For […]
-
Time:2019-10-17
Sample code #include int main() { char c = 255; printf(“%d\n”, c); int i = 255; printf(“%d\n”, i); return 0; } Output result -1 255 explain Computers store values in the form of binary complements. The size of char is 1 byte (8bit), and the value range is – 128 ~ 127. The […]
-
Time:2019-7-16
Recently, there have been so many thieves who haven’t had much time to write blogs and haven’t updated blogs for a long time. But when I look at the JDK source code, I have a great feeling that the foundation is really important, so what is the foundation? In addition to the basic grammar of […]