Author Topic: Atmega bit shifting  (Read 8906 times)

0 Members and 1 Guest are viewing this topic.

Offline paulca

  • Super Contributor
  • ***
  • Posts: 4046
  • Country: gb
Re: Atmega bit shifting
« Reply #50 on: January 19, 2018, 07:38:56 am »
I dunno, why not use Serial.print((0x0F & (myByte>>1)), BIN);
Granted, it doesn't suppress the lead 4 bits. Personally, I'd live with that.

Pride and quality.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf