English
Language : 

CC78K4 Datasheet, PDF (89/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 5 OPERATORS AND EXPRESSIONS
Shift Operators
<< >>
<1> Left shift (<<) operators
FUNCTION
The binary << (left shift) operator shifts the left operand to the left the number of bits specified by the right
operand and fills zeros in vacated bits. If the left operand E1 has an unsigned type in “E1 << E2”, the result will
become a value obtained by multiplying E1 by the E2th power of 2.
SYNTAX
E1 << E2
<2> Right shift (>>) operators
FUNCTION
The binary >> (right shift) operator shifts the left operand to the right the number of bits specified by the right
operand. If the left operand is unsigned, zeros are filled in vacated bits (Logical shift). If the left operand is
signed, a copy of the sign bit is filled in vacated bits.
If the left operand E1 is unsigned or signed and has a non-negative value in “E1>>E2”, the result will become a
value obtained by dividing E1 by the E2th power of 2.
SYNTAX
E1 >> E2
User’s Manual U15556EJ1V0UM
89