1. Engineering
  2. Computer Science
  3. 131 decimal 1 a what is the value of 102...

Question: 131 decimal 1 a what is the value of 102...

Question details

13.1 DECIMAL 1. (a) What is the value of 102? 10 100? (b) In terms of positional notation, explain why the number 123 is different from the number 321 2. Devise a Java statement, which will convert a variable ch (of type char) containing a digit to its decimal equivalent. For example, the statement will yield the value 9 from the character 9,or O from 0 3. Devise a Java statement, which will convert a decimal digit to the equivalent character For example, 9 would yield 9 and 0 would yield 0 . 4.Write a method convert which will accept a string of length 3 containing digits only, and wil return the decimal equivalent. For example, if the string 987 is passed to the method, the method will return 987. (Hint: see Exercise 2.) 5. Define a method dstring which will accept a 3 digit integer and return the equivalent string. For example, if 987 is passed to the method, it will retu 987. (Hint: see Exercise 3.) 13.2 BINARY AND HEXADECIMAL Count the number of your fingers using the binary number system (with binary digits o and 1 only). Count the number of your fingers and toes using the hexadecimal number system. 3. How many binary digits (bits) does it take to count from zero to nine? From zero to fifteen? 4. State exactly what each of the bits in the binary number 111 represents. 5. (a) State exactly what each of the digits in the hexadecimal number 0x111 represents. 6. Convert each of the following decimal numbers to binary: (b) Repeat the process for the number 0x9A0 (a) 201(b) 256 c) 94 (d) 10 (e) 1000
7. Convert each of the following hexadecimal numbers to binary: (a) 0x201 b) 0x256 (c) 0x94 (d) 0x10 (e) 0x1000 (f) 0xDAD (g) 0xDC10 (h) 0xCOB (i) 0xABC Convert each of the following decimal numbers to hexadecimal (a) 500 (b) 707 c) 18 Convert each of the following binary numbers to decimal 8. (d) 1111 (e) 1232 9. (b) 100 ( 100010101 (g) 1110001 0) 1100110 (d) 0101 (h) 1010101010 (c) 1010 (a) 1101 (e) 1100101 (i) 100100 (k) 1000001 Convert each of the binary numbers of Exercise 9 to hexadecimal Distinguish between the numbers 10, 010, and 0x10 Do the following conversions. Show all work. (a) (152)io to base 8 (b) (284) 16 to base2 (c) (11010101) 2 to base 10 Perform the following in binary and check your results using decimal. (a) 110011 10. 11. 12. 13. (b) 111000 +10000 (d) 101010 (c) 100010 x 1001
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution