Apr 3, 2016 #1 thannara123 Advanced Member level 5 Joined Jan 7, 2010 Messages 1,580 Helped 122 Reputation 244 Reaction score 114 Trophy points 1,353 Location India Activity points 10,394 I want to know the size ( width of the bit ) of unsigned integer value in 8051 using keil compiler C51 . their site give as 16 bit https://www.keil.com/support/man/docs/c51/c51_le_datatypes.htm If yes , How to check it in keil simulator . is there any way to see that int value . My real question is If it is 16 bit How to manipulate ? ( How to extract it to 8 bit because the ort is 8 bit ) .
I want to know the size ( width of the bit ) of unsigned integer value in 8051 using keil compiler C51 . their site give as 16 bit https://www.keil.com/support/man/docs/c51/c51_le_datatypes.htm If yes , How to check it in keil simulator . is there any way to see that int value . My real question is If it is 16 bit How to manipulate ? ( How to extract it to 8 bit because the ort is 8 bit ) .
Apr 3, 2016 #2 Easyrider83 Advanced Member level 5 Joined Oct 11, 2011 Messages 1,608 Helped 374 Reputation 748 Reaction score 363 Trophy points 1,363 Location Tallinn, Estonia Activity points 8,575 https://www.tutorialspoint.com/cprogramming/c_data_types.htm
Apr 3, 2016 #3 P pic.programmer Advanced Member level 3 Joined Aug 19, 2015 Messages 773 Helped 141 Reputation 284 Reaction score 140 Trophy points 43 Activity points 7,531 Try this Code: unsigned int size = 0; unsigned int myInt = 0 void main() { size = sizeof(myInt); }