Question: Fill in chart by converting first colum from dec to bin and then following instructions accelReading is just the first columb numbers converted to binary
Fill in chart by converting first colum from dec to bin and then following instructions
accelReading is just the first columb numbers converted to binary
| raw sensor value (decimal) | (short int) accelReading (binary) | accelReading & (1<<11) (boolean) | if(accelReading & (1<<11)) { accelReading |= 0xF000; } | two's complement (boolean) | signed value (decimal) | |||
| 0 | 0b0000 0000 0000 0000 | FALSE | 0b0000 0000 0000 0000 |
| 0 | |||
| 1 | ||||||||
| 2 | ||||||||
| 511 | ||||||||
| 1024 | ||||||||
| 2046 | ||||||||
| 2047 | ||||||||
| 2048 | 0b0000 1000 0000 0000 | TRUE | 0b1111 1000 0000 0000 | 0b0000 1000 0000 0000 | -2048 | |||
| 2049 | ||||||||
| 3072 | ||||||||
| 3584 | - | |||||||
| 4094 | ||||||||
| 4095 |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
