So understanding the concept of converting the remainders 10-15 in Hex A-F
Type: Posts; User: Sygo
So understanding the concept of converting the remainders 10-15 in Hex A-F
ok I know what you ment in code terms thats what I just wrote in the line ahead so p=16 the base or power correct
so I'll explain it in code terms
n=921;
p=16;
q=n/p;
r=n%p;
is that what...
0. Let n = the number you are converting
1. Find p, the highest power of 16 which fits into n.
2. Divide n by p to get result q and remainder r.
3. Output q, which is a value between 0 and 15, as...
Ok thanks for clearing that up I'm still a newbie also instead of p/16 would it be better to do
p%16;
So example p=15;
p=p%16 result= 15 now at this point the logic for the reading 'F' in Ascii
also what do you mean by OP
Yes he is correct I know of the easier ways of doing it I was wondering how to figure out the logic. Without using standard commands in the lib
so far in my mind as an character bit have an control statement. have it loop till '.' is represtented in the array possibly and have it break into an inner control statement and increment the rest...
The next would be thought to convert 1A23.A3 to 6691.163 if thats would be the right calculation ha ha
Hexiadecimal fraction I guess for example 1A23.A3
Hello to everyone I'm new to the c-programming board.
I'll first start off with my first question.
I know of the itoa, strol, and sprintf way to convert a dec to Hex, but I'm actually trying...