1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

2進固定小数点4ビットを10進固定小数点1桁にして遊ぶ。(主に温度センサー)

Posted at

いろいろ注意

  • 過去ログを見よ
  • arduinoでの予定は、未定

プログラム

  • オンラインコンパイラpaiza

#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    
    int a = 392; // 24.5 2進固定小数点4ビットの値
    
    a = a * 625;
    a = a / 1000;
    
    printf("%d\n",a); //10進固定小数点1桁
    
}



245

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?