Convert the following numbers as directed (i) 264.015(10) into binary and hexadecimal (ii) 345611(10) into octal and binary (iii) String “DATA STRUCTURES marks 50” to ASCII and Unicode string (iv) 8D614E(16) to decimal and binary

, , No Comments

Certainly! Let's convert the given numbers and strings as directed:


(i) 264.015(10) into Binary and Hexadecimal:


Binary:

- The integer part 264 in binary is 100001000.

- The fractional part 0.015 in binary can be obtained by multiplying 0.015 with 2, which gives 0.03. The binary representation of 0.03 is 0.00001 (approx.).

- Combining the integer and fractional parts, 264.015 in binary is 100001000.00001.


Hexadecimal:

- Converting the integer part 264 to hexadecimal: 264 in hexadecimal is 108.

- Converting the fractional part 0.015 to hexadecimal is approximately 0.03 in decimal, which corresponds to 0.04 in hexadecimal.

- Therefore, 264.015 in hexadecimal is 108.04.


(ii) 345611(10) into Octal and Binary:


Octal:

- 345611 in octal is 1246743.


Binary:

- Converting 345611 to binary: 345611 in binary is 1010100010000101011.


(iii) String “DATA STRUCTURES marks 50” to ASCII and Unicode string:


- ASCII Representation: Each character in the string is represented by its corresponding ASCII code.

  - D: 68

  - A: 65

  - T: 84

  - A: 65

  - (Space): 32

  - S: 83

  - T: 84

  - R: 82

  - U: 85

  - C: 67

  - T: 84

  - U: 85

  - R: 82

  - E: 69

  - S: 83

  - (Space): 32

  - M: 77

  - A: 65

  - R: 82

  - K: 75

  - S: 83

  - (Space): 32

  - 5: 53

  - 0: 48


  ASCII representation of the given string: "DATATASSTRUCTURES5 0"


- Unicode Representation: The Unicode representation of the string would be the same as ASCII in this case because the characters used are within the ASCII range.


(iv) 8D614E(16) to Decimal and Binary:


Decimal:

- Converting 8D614E from hexadecimal to decimal: 8D614E in hexadecimal is 9272814 in decimal.


Binary:

- Converting 8D614E from hexadecimal to binary: 8D614E in binary is 10001101000011001001110. 

0 टिप्पणियाँ:

Post a Comment