Need help with masking bits

Why isn't this masking allowed? outdata previously declared as type 'word' (16 bit, same as unsigned int)

outdata = outdata & B0000000111111100;

results in compile error: 'B0000000111111100' was not declared in this scope

yet this compiles okay outdata = outdata & 0x01FC;

Have you ever tried typing out 65536 variations of Bxxxxxx? I'm amazed they got as far as 256!

If you find "B0000000111111100" to be more understandable / legible than "0x01FC", put this in your Sketch...

define B0000000111111100 (0x01FC)

I am shifting this out into two 8 bit shift registers to control 9 LEDs turning on/off (with 7 bits for stuff yet to be defined). I plan to AND in 0s to turn them off, and OR in 1s to turn them on. They can be turned off/on independently of each other based on what is happening with other inputs, etc. Having a huge field of defines is thus not helpful. Being able to show the masking in binary makes it easier to follow as I code it. As it is, I have the binary in the code, I am now going thru commenting those out and adding the line a 2nd time as the hex equivalent.

Seems like something is lacking compiler-wise if bit manipulation can't be done both ways.

Having a huge field of defines is thus not helpful

How do you think the B00000000 to B11111111 constants are defined?

Hex is easy enough to convert in your head to binary - only 16 symbols.

Long binary constants are a PITA - easy to lose where you are.

What's wrong with 0b0000000111111100 notation?

Just whining I guess. Was kinda on a roll, now having to go back & make a bunch of tweaks to fix those.

Here's another question regarding timing:

I am writing what's basically a big sequencer, driving a low level signal out and watching for it to come back on another pin for a couple of mS (need 2mS min contact time for example). I'm figuring if I do this:

void loop()
{
  unsigned long currentMicros = micros();  // see how long its been
  if (currentMicros - previousMicros >= interval) // more than our 0.1mS interval? (100uS)
  {
    // save the last time we okayed time updates 
    previousMicros = currentMicros; 
    tenth_mS_interval = tenth_ms_interval+1;
  }
  // do stuff on 0.1mS intervals, 1mS intervals, ets.
  
}

That would allow 1600 operations between intervals, correct? 100uS/62.5nS = 1600 and I could control/time stuff with 0.1mS timing if needed?

0b0000111100001111 - that's what I was after - didn't know it was 0b at the start that I needed. Thanks. Didn't see that in the reference section.

That's a very good way to code an interval timer.