• shifting bits
    I'm trying to read the data from an ADC. I'm getting the error message error C193 '+=' bad operand type. If I use '=+' I don't get the error but my data is shifting. My result is a 0 or 1. It should be...
  • coufused by array and shift bit
    Hi, The code is given below. void CSToOut(void) { static unsigned char data bSimulate[8] ; int I; for( I = 0 ;I < 8;I ++) { bSimulate[I] = 0x01 << I ; ComOutChar( bSimulate[I] ); } } ...
  • shifting bits in multiple bytes array
    Hello All, I have non-standart function that shifting bits in multi bytes. Syntax: shift_left (address, bytes, value); Parameters: address is a pointer to memory. bytes is a count of the...
  • ARM: is bit shift result correct?
    A variable shifted right seems to result in an incorrect value. uint64_t i = 13,825,587,238; i = i >> 7u; The situation is observed when 13,825,587,238 is right shifted 7. The correct value...
  • C51 Compiler: Inconsistent Behaviour of Bit Shift Operator (<<)
    Compiler Version: Keil C51 5.0 I experienced some unexpected behaviour with the Keil C51 compiler. I have recreated the issue in the below code snippets. Case 1: Result of bit shift operator...