This article is a mirror article of machine translation, please click here to jump to the original article.

View: 13616|Reply: 0

[C] The definition of the segment is a reference

[Copy link]
Posted on 12/16/2015 10:56:06 AM | | |
Bit operations, why C is a machine-friendly language, and how C operates on binaries.
1. The general format of the declaration segment
Type Name [Member Name]: Width
The type of segment member can be specified as an unsigned int or an int type. The "width" should be an integer constant expression with a value that is non-negative and must be less than or equal to the bit length of the instruction type.
2. Pair segment group, even if the actual length only occupies one byte, but allocates 4 bytes. If you want to specify a certain bit segment to be stored from a memory unit (word).
3. A bit segment must be stored in the same memory cell, not across two memory cells. If the space of the first storage unit cannot accommodate the next segment, the storage space is not used, and the segment is stored from the next unit
4. Anonymous ranks can be defined
unsigned a:1 ;
unsigned :2; (These two spaces are not used)
unsigned b:3;
unsigned c:4;
5. The length of the bit segment cannot be greater than the length of the memory unit, and the bit segment array cannot be defined
6. The number in the bit segment can be output with integer formatting
7. The bit segment can be referenced in the array expression, and it will be automatically converted into an integer number by the system.
data.a+5/data.b
is legal






Previous:WordPress Recommendation Plugin: WP SLUG Translate
Next:WPF reads and writes config files
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com