| Electronic Components Datasheet Search |
|
78IV Datasheet(PDF) 67 Page - NEC |
|
|
|||||||||||||||||||||||||||||
78IV Datasheet(HTML) 67 Page - NEC |
|
67 / 523 page ![]() CHAPTER 4 TYPE CONVERSIONS User’s Manual U15556EJ1V0UM 67 4.1 Arithmetic Operands (1) Characters and integers (general integral promotion) The data types of char, short int, and int bit fields (whether they are signed or unsigned) or of objects that have an enumeration type will be converted to int types if their values are within the range that can be represented with int types. If not within the range, they will be converted to unsigned int types. These implicit type conversions are referred to as “general integral general promotion”. All other arithmetic types will not be changed by this general integral promotion. In general integral promotion, the value of the original data type is retained, including its sign. char type data without a type qualifier will normally be handled as signed char in this compiler. If can also be handled as unsigned char by using an option. (2) Signed integers and unsigned integers When a value with an integer type is converted to another, the value will not be changed if the value can be expressed by the integer type after conversion. When a signed integer is converted to an unsigned integer of the same or larger size, the value is not changed unless the value of the signed integer is negative. If the value of the signed integer is negative and the unsigned integer has a size larger than that of the signed integer, the signed integer is expanded to the signed integer with the same size as the unsigned integer, and then it is added to the value equal to the maximum number that can be expressed with the unsigned integer plus 1, and the signed integer before conversion is converted to the unsigned value. When a value with an integer type is converted to an unsigned integer with a smaller size, the conversion result is the non-negative remainder of the value divided with that value which 1 is added to the maximum number that can be expressed with an unsigned integer after conversion. When a value with an integer type is converted to a signed integer with smaller size or when an unsigned integer is converted to a signed integer with the same size, the overflowed value is ignored if the value after conversion cannot be expressed. For the conversion pattern, refer to Table 4-1. List of Conversions between Types. Conversion operations from signed integral type to unsigned integral type are as listed in Table 4-2 below. Table 4-2. Conversions from Signed Integral Type to Unsigned Integral Type unsigned Smaller in Value Range Greater in Value Range +/ signed – /+ : Type conversion will be performed properly. +: The data will be converted to a positive integer. /: The result of the conversion will be the remainder of the integer value, modulo the largest possible value of the type to be converted plus 1. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |