Thursday,8 October 2015.
Topik yang dipelajari : Operator,Operand, and Arithmetic
*Operator and Operand Introduction
1.Example :
C=A+B
[ “=” And “+” are operators, A,B,and C are operands]
2.Based on its operand number,operator can be divided into three :
-Unary Operator ( Need One Operand)
-Binary Operator ( Needs Two Operands)
-Ternary Operator ( Needs Three Operands)
3.Berdasarkan tipe operasinya,operator dapat dibagi menjadi :
Assignment operator,logical operator,arithmetic operator,relational operator,bitwise operator, and pointer operator.
*int=bilangan bulat (dibulatkan ke bawah)
Example : 3,5=3
*Increment and Decrement
Symbol : Increment(++) and Decrement(–)
Pre increment (++N)
Post increment (N++)
Pre decrement (–N)
Post decrement (N–)
“==” : Membandingan apakah True/False
“=” : Memasukkan Nilai
*Fungsi xor : Lawannya fungsi biimplikasi
-True + True = False
-False +False =False
-True + False = True
-False +True = True
*-10
Carilah angka 2^n,yang lebih kecil dari 10.
_ _ _ _
2^3 2^2 2^1 2^0 = 1 0 1 0
-37
_ _ _ _ _ _
2^5 2^4 2^3 2^2 2^1 2^0 = 1 0 0 1 0 1
– 11 =3
-111 =7
-1111=15