0
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?

More than 3 years have passed since last update.

ArduinoUNOでAND命令で遊ぶ

Last updated at Posted at 2021-11-13

目的
ビット演算の理解を深める

o_con96.jpg

o_con97.jpg

o_con98.jpg

o_con91.jpg




# include <Arduino.h>

int al; //アキュムレータ

int data_s[]={
  0x41,0x82,0x104,0x208,  0x410,0x820,0x1040,0x2080
};


void setup() {

  Serial.begin(9600); // 9600bpsでポートを開く

  Serial.println(' ');
  Serial.println("START");

  for (int jj = 0; jj < 8; jj++) {

    al = data_s[jj] & 0x80;

   Serial.print(al, HEX); Serial.print(" <-  0x"); Serial.print(data_s[jj],HEX);Serial.println("  & 0x80");

  }//for

}//setup

void loop() {
}//loop





0
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
0
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?