Convert the following numbers as directed (i) Decimal 119.0625 into binary and hexadecimal (ii) Decimal 25600 into binary and hexadecimal (iii) String “MATHS marks 50” to ASCII and Unicode string (iv) Hexadecimal 9A8C7E to decimal and binary

Conversion:-
There are two methods of converting decimals to binary. Here we present both methods using the number 85 as an example.
85 = 1 * 26 + 0 * 25 + 1 * 24 + 0 * 23 + 1 * 22 + 0 * 21 + 1 * 20.
The binary representation of 85 is given by the coefficients in this representation listed one after another, starting with the highest power of 2: 1010101.
First observation: the last digit in the binary representation is always the remainder of the number when divided by two. That is, it is 1 if the number is odd, and 0 if it is even.
Second observation: if we erase the last digit of a binary number, then we get a new binary number which is equal to half the original number, with the fraction of 1/2 dropped if the original number was odd.
For example, consider the number n whose binary representation is abcd is equal to a * 23 + b * 22 + c * 21 + d * 20.
Then note that n = 2 * (a * 22 + b * 21 + c * 20) + d. So n is even if d=0 and odd if d=1 (first observation). Also note that if we divide n by two and drop any fraction of 1/2 (if d is odd), then we get a * 22 + b * 21 + c * 20, which has binary representation abc, which is what you get if you erase the last binary digit of n (second observation).
Although we only proved our observations with 4-digit binary numbers, the same argument works no matter how many digits we have.
So [binary represenation of 85]=[binary representation of 42]1.
The number 42 is even, hence its last binary digit is 0. Dividing 42 by 2 we get 21. So [binary represenation of 85]=[binary representation of 21]01.
21’s last binary digit is 1 (as it is odd). Subtract 1 and divide by two again: we get 10. So [binary represenation of 85]=[binary representation of 10]101.
10’s last binary digit is 0. 10/2 = 5.
So [binary represenation of 85]=[binary representation of 5]0101. 5’s last binary digit is 1. Then 4/2 = 2.
So [binary represenation of 85]=[binary representation of 2]10101. 2’s last binary digit is 0. Dividing 2 by 2, we get 1.
So [binary represenation of 85]=[binary representation of 1]010101. Now the binary digit 1 represents the number 1.
So the binary represenation of 85 is 1010101.

First method. We are trying to represent the number 85 as the sum of powers of two starting from the largest. Find the largest power of 2 which is not more than 85. It is 64 = 26. Subtract it: 85 – 26 = 21. The result will always be less than the power of two that was subtracted (can you figure out why?). Now we need to represent 21 as the sum of powers of 2. Continue as before: the biggest power of two which is not more then 21 is 16 = 24. Subtract it: 21 – 24 = 5. Now we need to represent 5 as the sum of powers of 2. Continue as before: the largest power of two which is not more then 5 is 4 = 22. Subtract it: 5 – 22 = 1. We can represent 1 as 20. We got that
85 = 26 + 24 + 22 + 20. This is the same as:

Second method. This method is based on two observations.

The number 85 is odd. Hence, the last digit is 1. Subtract 1, we get 84. Then dividing 84 by 2 we get 42. Binary representation of 42 will get us all other digits in front of the last.
(i) Decimal 119.0625 into binary and hexadecimal Ans :- (119.0625)10 = (01110111)2
(119.0625)10 = (77)16
(ii) Decimal 25600 into binary and hexadecimal Ans :- (25600)10 = (0110010000000000)2
(25600)10 = (6400)16
(iii) String “MATHS marks 50” to ASCII and Unicode string

Ans : “MATHS marks 50” = 77 65 84 72 83 32 109 97 114 107 115 32 53
48
“MATHS marks
50” = 0000004d00000041000000540000004800000053
0000006d00000061000000720000006b00000073 0000003500000030(UTF
– 32)
(iv) Hexadecimal 9A8C7E to decimal and binary Ans :- (9A8C7E)16 = (10128510)10
(9A8C7E)16 = (1001 1010 1000 1100 0111 1110)2

Conversión:-
Hay dos métodos para convertir decimales a binarios. Aquí presentamos ambos métodos usando el número 85 como un ejemplo.
85 = 1 * 26 + 0 * 25 + 1 * 24 + 0 * 23 + 1 * 22 + 0 * 21 + 1 * 20.
La representación binaria de 85 está dada por los coeficientes en esta representación enumerados uno después de otro, comenzando con la potencia más alta de 2: 1010101.
Primera observación: el último dígito en la representación binaria es siempre el resto del número cuando se divide por dos. Es decir, es 1 si el número es impar y 0 si es par.
Segunda observación: si borramos el último dígito de un número binario, obtenemos un nuevo número binario que es igual a la mitad del número original, con la fracción de 1/2 caída si el número original era impar.
Por ejemplo, considere el número n cuya representación binaria es abcd es igual a a * 23 + b * 22 + c * 21 + d * 20.
Luego tenga en cuenta que n = 2 * (a * 22 + b * 21 + c * 20) + d. Entonces n es incluso si d = 0 e impar si d = 1 (primera observación). También tenga en cuenta que si dividimos n por dos y eliminamos cualquier fracción de 1/2 (si d es impar), obtenemos un * 22 + b * 21 + c * 20, que tiene una representación binaria abc, que es lo que obtienes si borras el último dígito binario de n (segunda observación).
Aunque solo probamos nuestras observaciones con números binarios de 4 dígitos, el mismo argumento funciona sin importar cuántos dígitos tengamos.
Entonces [representación binaria de 85] = [representación binaria de 42] 1.
El número 42 es par, de ahí que su último dígito binario sea 0. Dividiendo 42 por 2 obtenemos 21. Entonces [representación binaria de 85] = [representación binaria de 21] 01.
El último dígito binario de 21 es 1 (como es impar). Reste 1 y divida por dos nuevamente: obtenemos 10. Entonces [representación binaria de 85] = [representación binaria de 10] 101.
El último dígito binario de 10 es 0. 10/2 = 5.
Entonces [representación binaria de 85] = [representación binaria de 5] 0101. El último dígito binario de 5 es 1. Luego 4/2 = 2.
Entonces [representación binaria de 85] = [representación binaria de 2] 10101. El último dígito binario de 2 es 0. Dividiendo 2 por 2, obtenemos 1.
Entonces [representación binaria de 85] = [representación binaria de 1] 010101. Ahora el dígito binario 1 representa el número 1.
Entonces la representación binaria de 85 es 1010101.

Primer método. Estamos tratando de representar el número 85 como la suma de los poderes de dos comenzando por el más grande. Encuentra la mayor potencia de 2 que no sea más de 85. Es 64 = 26. Restala: 85 – 26 = 21. El resultado siempre será menor que el poder de dos que se restaron (¿puedes averiguar por qué?) . Ahora necesitamos representar 21 como la suma de los poderes de 2. Continuar como antes: la mayor potencia de dos que no es más que 21 es 16 = 24. Restarla: 21 – 24 = 5. Ahora tenemos que representar 5 como la suma de potencias de 2. Continuar como antes: la mayor potencia de dos que no es más que 5 es 4 = 22. Restarlo: 5 – 22 = 1. Podemos representar 1 como 20. Lo tenemos
85 = 26 + 24 + 22 + 20. Esto es lo mismo que:

Segundo método. Este método se basa en dos observaciones.
 
El número 85 es impar. Por lo tanto, el último dígito es 1. Reste 1, obtenemos 84. Luego, dividiendo 84 por 2 obtenemos 42. La representación binaria de 42 nos dará todos los demás dígitos delante del último.
(i) Decimal 119.0625 en formato binario y hexadecimal Resp .: – (119.0625) 10 = (01110111) 2
(119.0625) 10 = (77) 16
(ii) Decimal 25600 en respuestas binarias y hexadecimales: – (25600) 10 = (0110010000000000) 2
(25600) 10 = (6400) 16
(iii) Cadena “MATEMÁTICAS marca 50” en cadenas ASCII y Unicode

Resp .: “MATEMÁTICAS marca 50” = 77 65 84 72 83 32 109 97 114 107 115 32 53
48
“Marcas de MATEMÁTICAS
50 “= 0000004d00000041000000540000004800000053
0000006d00000061000000720000006b00000073 0000003500000030 (UTF)
– 32)
(iv) hexadecimal 9A8C7E a decimal y binario Ans: – (9A8C7E) 16 = (10128510) 10
(9A8C7E) 16 = (1001 1010 1000 1100 0111 1110) 2

IGNOU EXAM DATE SHEET DECEMBER 2017

Afflluence Writng Service

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

error: Content is protected !!