0 penilaian0% menganggap dokumen ini bermanfaat (0 suara)
17 tayangan4 halaman
This document discusses different number bases including decimal, binary, octal, and hexadecimal. It provides examples of converting between the bases, such as representing 147 in decimal as 10010011 in binary. Techniques are presented for storing numbers in different bases, like using a leading 0 to indicate octal format. Common operations like addition and multiplication are demonstrated for binary and octal numbers.
This document discusses different number bases including decimal, binary, octal, and hexadecimal. It provides examples of converting between the bases, such as representing 147 in decimal as 10010011 in binary. Techniques are presented for storing numbers in different bases, like using a leading 0 to indicate octal format. Common operations like addition and multiplication are demonstrated for binary and octal numbers.
This document discusses different number bases including decimal, binary, octal, and hexadecimal. It provides examples of converting between the bases, such as representing 147 in decimal as 10010011 in binary. Techniques are presented for storing numbers in different bases, like using a leading 0 to indicate octal format. Common operations like addition and multiplication are demonstrated for binary and octal numbers.
the leading 0 indicates octal format Convert an integer variable to a hex String: f3d hex Convert an integer variable to a binary String: 111100111101 bin Convert an integer variable to an octal String: 7475 oct
int
int
Base conversion using parseInt:
String
int
Integer.parseInt(3w4br, 35) A technique for converting 147 from decimal to binary:
10010011 bin = 147 dec
A technique for converting 3741 from decimal to hex: