binary - Shifting fractions in c -
binary - Shifting fractions in c -
i have code:
int = 3, b = 2; (a/b) << 3 ;
how a/b
shifted? , how can represent fractions in binary?
(a/b) not shifted. evaluate look (a/b) int/int int, shifted.
(a/b) << 3 (3/2) << 3 //integer divided integer gives integer, 1 (1) << 3 // 1 left shifted 3 bits 8
c binary bit-shift
Comments
Post a Comment