??? 04/23/06 02:24 Read: times |
#114770 - Back to basics Responding to: ???'s previous message |
Ant, You need to do some reading on number systems. I recall being taught this back in primary school! In binary, from right to left, each digit is an ascending power of two (in decimal it is an ascending power of 10). Ascending meand 'going up' and power of two is 2^0,2^1 etc. Put simply,from right to left each digit equals the following: 1,2,4,8,16,32,64,128,256,512,1024........ So for 10011011 which is 9B in hexadecimal is equal to: 1 * 1 1 * 2 0 * 4 1 * 8 1 * 16 0 * 32 0 * 64 1 * 128 = 128 + 16 + 8 + 2 + 1 = 155 decimal How do you get the cpu to do this? There's many ways. This is usually called something like binary to bcd conversion. There's example code in the code library. |
Topic | Author | Date |
Adc output | 01/01/70 00:00 | |
Back to basics | 01/01/70 00:00 | |
binary | 01/01/70 00:00 | |
Not quite! | 01/01/70 00:00 | |
A bad tip that works | 01/01/70 00:00 | |
bad? I'd say elegant | 01/01/70 00:00 | |
4.096 | 01/01/70 00:00 | |
It's an 8-bit converter | 01/01/70 00:00 | |
I know | 01/01/70 00:00 | |
2.56![]() | 01/01/70 00:00 |