Quantcast
Channel: Keil Discussion Forum RSS Feed
Viewing all articles
Browse latest Browse all 3049

C51: C51 Compiler: Inconsistent Behaviour of Bit Shift Operator (<<) (10 Replies)

$
0
0
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 is type casted from uchar (8b) to ulong (32b) correctly unsigned long tempadcVal; unsigned char data_save_high = 0xA4; unsigned char data_save_low = 0x3F; //The expected 32b value without any information loss //Is loaded into tempadcVal tempadcVal = (data_save_high<&a

Viewing all articles
Browse latest Browse all 3049

Trending Articles