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

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -