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?

[例題の為の例題]aの値を16進で表示せよ!!!(八桁)(オンラインコンパイラ)(最小系統)(ミニマムシステム(xiao))(小マイコン)

Last updated at Posted at 2025-10-18

いろいろ注意

  • 過去ログを見よ!!!
  • arduinoでの予定は、未定
  • 8ビットの置き換えの小規模回路マイクロコンピュータは、最小系統と言うらしい(なんの事
  • いろいろ、黄色い人がSTM32C011F4P6を採用しているみたい(80円)

o_coq981.jpg

プログラム

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



#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    char *b = "0123456789ABCDEF";  //16進の変換テーブル

    int a = 0x12345678;  //入力値

    putchar(b[a >> 28 & 0x0f]);  //32ビット目から4ビット
    putchar(b[a >> 24 & 0x0f]);  //28ビット目から4ビット
    putchar(b[a >> 20 & 0x0f]);  //24ビット目から4ビット
    putchar(b[a >> 16 & 0x0f]);  //20ビット目から4ビット

    putchar(b[a >> 12 & 0x0f]);  //16ビット目から4ビット
    putchar(b[a >>  8 & 0x0f]);  //12ビット目から4ビット
    putchar(b[a >>  4 & 0x0f]);  //8ビット目から4ビット
    putchar(b[a       & 0x0f]);  //4ビット目から4ビット
    putchar('\n');
}  //main




12345678

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?