-
Use the rounding remainder method to do:
8 2=4 remainder 0
4 2=2 remainder 0
2 2=1 remainder 0
1 2=0 remainder 1
So the binary of 8 is 100
15 2=7 remainder 1
7 2=3 remainder 1
3 2=1 remainder 1
1 2=0 remainder 1
So the binary of 15 is 1111
Integer part 0 decimal part.
Integer part 1 Decimal part.
Integer part 1 Decimal part.
Integer part 1 Decimal part.
Integer part 0 decimal part.
Integer part 0 decimal part.
Integer part 1 Decimal part.
So the binary constraint is:
27 2=13 remainder 1
13 2=6 remainder 1
6 2=3 0
3 2=1 remainder 1
1 2=0 remainder 1
Integer part 1 Decimal part.
Integer part 1 Decimal part 0
So the binary is.
So the decimal system of 101101 is 45Among them, 2 5 represents 2 to the 5th power (because the keyboard is not good at typing mathematical formulas, so only this means that when you write, you can change it.)
-
It's a very simple process, but it's not easy to explain in words, so you can add me to explain it to you in detail.
-
Convert the decimal number 268 to a binary number.
Then convert to a hexadecimal number.
The calculation is as follows:
Step 1Convert the decimal number 268 to a binary number.
Splitting a decimal number into an integer power of 2.
268 d = 100001100 b
Step 2to convert the binary number 100001100 to a hexadecimal number.
From right to left, four digits turn into one.
10c1 0000 1100 b = 10c h
-
Decimal integers are converted to binary integers"Divide by 2 and take the remainder and arrange them in reverse order"Law.
The specific method is: divide the decimal integer by 2 to get a quotient and remainder; Removing the quotient with 2 will give a quotient and remainder again, and so on until the quotient is less than 1, and then the remainder obtained first will be used as the lower significant digit of the binary number, and the remainder obtained later will be used as the high significant digit of the binary number, and then arranged in turn.
Principle: As we all know, the base of binary is 2, and the 2 divided by us when we decimalize binary is its cardinality. Speaking of its principle, we have to talk about the concept of position rights.
The numerical value represented by the digit symbols in a decimal counting system means that the numeric symbol value is multiplied by a constant related to the numeric symbol, which is called the "bit weight".
The magnitude of the bit weight is based on the cardinality, and the ordinal number of the position of the number sign is an integer power of the exponent. The weights of hundreds, tens, units, and tenths of decimal numbers are 10 to the 2nd power, 10 to the 1st power, 10 to the 0th power, and 10 to the -1st power. A binary number is an n-power of 2.
-
If you follow a method similar to changing the base 2, you can change 202 to the base 8, which is also possible.
The result is 0312
In 64, if you count how many 64s there are in 202, we get 3, and then 202-64 3=10
In 8 here, we have to count how many 8s there are in 10, and we get 1, and then 10-8 1=2
In 1, we need to count how many 1's there are in 2 to get 2
That is, multiplication, division and subtraction must be calculated once under each column, and since it is occimal, the division result is 0 to 7, not larger.
Binary looks simple because the division result can only be 0 or 1, so easy that you can ignore its existence, so it looks like just a subtraction.
Similarly, in the hexadecimal system, the division result of each column may be 0 to 15, which is even more troublesome.
So the method is the same, but it's only easy to use in binary.
There is another way.
It is to first turn the decimal into binary, and then turn the decimal into octal or hexadecimal.
For example, in 202, binary is 11001010
From right to left, it is divided into a group of 3 numbers, as 3 base 2 numbers, it is easy to calculate the value of base 10 with your eyes, and the corresponding base 8 is also , and then connected together, the base base of 202 is 312
Then from right to left into a group of every 4 numbers, as 2 base 2 numbers, it is easy to calculate the decimal value with your eyes is , corresponding to the hexadecimal is c, a, and then connected together, the hexadecimal system of 202 is ca
-
Decimal decimal is converted to n: multiply by n, round up sequentially.
2= Take 1
A decimal decimal does not necessarily translate to a binary decimal exactly, approximately 7 digits.
The base system is converted to the decimal system, and the bitwise weight.
0 is 7 digits 0*2 7+
1 is a 6-bit 1*2 6+
0 is 5 digits 0*2 5+
1 is 4 digits ··
1 is 3 digits.
0 is 2 digits.
1 is 1 bit.
1 is 0 digits 1*2 0
-
Use the "divide by 2 remainder" algorithm:
126 2 quotient 63 remainder 0
63 2 quotient 31 remainder 1
31 2 quotient 15 remainder 1
15 2 quotient 7 remainder 1
7 2 quotient 3 remainder 1
3 2 Quotient 1 Remainder 1
1 2 quotient 0 remainder 1
Composition binary number: 111 1110
-
The binary of decimal 126 is 1111110
-
Binary, octal, decimal, hexadecimal computer exercises! 1.What is the smallest number?
a.Decimal number 55 bBinary number 110101 c
Octal number 101 dHexadecimal Tree 42 2The first number in each set of data is octal, the second number is binary, the third tree is hexadecimal, and the three values are the same. ,10111111,bf ,10000011,83 ,1010011,a8 ,10010110,96 3.The decimal number 100, expressed in hexadecimal as ? 4.
Convert the following decimal numbers to binary numbers, and then to octal and hexadecimal numbers. (1)67 (2)253 (3)1024 (4) (5) 8.Write the following decimal numbers as binary original, complement, and inverse codes with a word length of 16 bits.
1)-64 (2)+119 (3)-256 (4)1000 Answers: 1, d
2、a3、c
fd4)
-
The most useful problem is to enter any decimal number from the keyboard, convert it to a binary number, output it to the screen display, or enter it into a file to save.
-
With the computer that comes with the system, it doesn't have a lot of exercises. Enter calc in Runtime
-
2 to 10: 1011 (binary) = 1x2x2x2 + 0x2x2 + 1x2 + 1 = 11 (decimal), binary addition: 1101 + 1011 = 11000, decimal to binary:
Divide the decimal number by 2 to take the remainder, and then divide the quotient by 2 and take the remainder, until the remaining 1 is divided by 2 and the remainder is 1 quotient 0, and then the remainder is reversed to row the binary number, remember that there is no remainder during the period to make up the remainder with 0, and the binary is reduced by two times (this sentence is a wrong statement, the narrowing is the fraction, and the expansion is the multiple, I will treat you as a shrinking halve): 1101x1 2=(, hexadecimal to binary: each bit of the hexadecimal number can be converted to 4-digit binary:
1e (hexadecimal) = 0001
1101, of which 1 against 0001 and e against 1101
-
So: 300d = 12c h
So: 300d = 100101100 b binary to decimal, first write the bit weight of the bit on each digit, that is, the first bit on the right is 2 to the power of 0, the second bit from the right is the 1st power of 2, and so on, into the following figure; Then multiply the value on each bit by the corresponding bit weight, and finally add it up.
Binary to hexadecimal, binary numbers from right to left every 4 digits in a group, see the figure below;
I've detailed one of these examples in the various types above.
-
Decimal 100 Hexadecimal 64 Binary 1100100
Decimal 258 Decimal 102 Decimal 100000010
Decimal 31 Hexadecimal 1f Decimal 111111
Decimal 127 Hexadecimal 7f Decimal 1111111
Decimal 300 16decimal 12c 2decimal 100101100
Decimal 46 Hexadecimal 2e Decimal 101110
Binary 01100100b Decimal 100 Hexadecimal 64
Binary 10101010B Decimal 170 Hexadecimal AA
2 01010101b Decimal 85 16 55
Binary 001011001010B Decimal 714 Hexadecimal 2ca
I've written a simple one for your reference before because it's not very perfect with include >>>More
The decimal number is divisible by other bases, and the resulting remainder is reversed, and the decimal part is multiplied by the other bases until it is an integer. For example, convert the decimal to binary integer part: 24 2=12....0 >>>More
In C, you can use the formatting controller of the printf() function to convert decimal numbers to hexadecimal. Specifically, you can use the %x format controller. For example: >>>More
If it's a method, I can give you a natural language description of how the decimal integer part n can be converted to binary as follows: >>>More
First to 16 and then to 2.
For example, 89: 89 16=5 and 9 so the hexadecimal representation is 59, and then 5 and 9 are represented by 4-digit binary numbers 5=0101 and 9=1001, so 89 is represented by 01011001 in binary >>>More