Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

conversion

Former Member
0 Likes
453

hi,

there is a hexa string variable h and the value of h = 07FF.

how to convert this into bytes . can u explain procedure

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
348

hi,

07FF it's base is 16 ( hexadecimal), convert that base 10 i.e ) decimals

F = 15

15 X 1 = 15

15 X 16 = 240

7 X 256 =1792

if add all the three u will get 2047

convert that into base 2 which is nothing but bits

this u will achieve by dividing whole number by 2 by keeping remainder a side

so u will get 111111111110 is bit

regards,

pavan

1 REPLY 1
Read only

Former Member
0 Likes
349

hi,

07FF it's base is 16 ( hexadecimal), convert that base 10 i.e ) decimals

F = 15

15 X 1 = 15

15 X 16 = 240

7 X 256 =1792

if add all the three u will get 2047

convert that into base 2 which is nothing but bits

this u will achieve by dividing whole number by 2 by keeping remainder a side

so u will get 111111111110 is bit

regards,

pavan