hello ,
i have project to do and i need to build project the project need to be
with bit field with 14 bit
in the end its need to be translate to assembly language
i still dont know how to do this but i need to make 8 place with 14 bit
Thanks
hello ,
i have project to do and i need to build project the project need to be
with bit field with 14 bit
in the end its need to be translate to assembly language
i still dont know how to do this but i need to make 8 place with 14 bit
Thanks
The syntax is simple enough, if you understand struct.
Code:struct foo { unsigned int myfield:14; };
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
FYI, the sizeof() a struct foo shows you the size of an unsigned int ( which on my system is 4 (bytes)).