3C科技 娛樂遊戲 美食旅遊 時尚美妝 親子育兒 生活休閒 金融理財 健康運動 寰宇綜合

Zi 字媒體

2017-07-25T20:27:27+00:00
加入好友
純C 位元移動運算實現2次方運算+簡易家法[C_Byte_setBit] GITHUB: https://github.com/jash-git/C_Byte_setBit #include #include unsigned char C_Byte_setBit(unsigned char data,int num) {//²¾°Ê¦¸¼Æ(1,2,3,4,5,6,7,8)¹ïÀ³ªº­È=1,2,4,8,16,32,64,128 unsigned char d=1;//2^0 if(num>0) { d=d<1 printf("%d\n", d); d=C_Byte_setBit(d,2);//out->3 printf("%d\n", d); return 0; }

本文由jashliaoeuwordpress提供 原文連結

寫了 5860316篇文章,獲得 23313次喜歡
精彩推薦