16进制0-15.
表示方法0-9 a b c d e f
10 11 12 13 14 15
16进制0-15.
表示方法0-9 a b c d e f
10 11 12 13 14 15
进制:是一种表示数字的方式,默认我们平时使用的数字使用的是士进制
十六进制:0-9abcdef
士进制
78541=70000+8000+500+40+1
=7*10000+8*1000+5*100+4*10+1*1
=7*10~4+8*10^3+5*10^2+4*10^1+1*10^0
八进制
3647=7*8^0+4*8^1+6*8^2+3*8^3
x进制
m3m2m1=m1*x^0+m2*x^1+m3*x^2
进制:是一种表示数字的方式,默认我们平时使用的数字使用的十进制
劝退好多初中不毕业的人
目前一口气看到这里,接受程度还可以,编码基本一遍过。
但目前的问题是依样画葫芦,知其所以但不知其所以然,希望在后面的课程中了解到这些特有名词的具体使用方式。
public class DataType{
public static void main (String[] args){
byte a = 100;
short b = 20000;
int c = 10000000;
long d = 199564347830L;
System.out.println(a);
System.out.println(b);
System.out.println(c);
System.out.println(d);
float e = 1.2f;
double f = 4.5;
System.out.println(e);
System.out.println(f);
char cA = 'a';
char cB = ' ';
char cC= '(';
System.out.println(cA);
System.out.println(cB);
System.out.println(cC);
boolean h = true;
boolean i = false;
System.out.println(h);
System.out.println(i);
}
}
x进制
abc=c*x^0+b*x^1+a*x^2
二进制
110=0+2+4
calc 计算机
Bin代表二进制
OTC 代表八进制
DEC代表十进制
HEX
进制:是一种表示数字的方式,默认我们平时使用的数字使用的是十进制
十六进制:0-9 a b c d e f
十进制
78541 = 70000 + 8000 + 500 + 40 + 1
= 7*10000 + 8*1000 + 5*100 + 4*10 1*1
=7*10^4 + 8*10^3 + 5*10^2 + 4*10^1 + 1*10^0
八进制
3647 = 7*8^0 + 4*8^1 + 6*8^2 + 3*8^3
X进制
x3x2x1 = x1*x^0 + x2*x^1 + x3*x^2
16进制
0-9 a b c d e f
10000 10^4
BIN 二进制
OCT 八进制
DEC 十进制
HEX 十六进制