PORTF write issue (Arduino ProMicro 32u4)

Hello, I don't understand this:

uint8_t val = 194;

why is this working:

PORTF |= val & 0xf0;

but not that:

PORTF |= val & 128;
PORTF |= val & 64;
PORTF |= val & 32;
PORTF |= val & 16;

I've read some issues with the fuses and the PORTF, but I don't thinks thats the problem.

By the way, the lower Bits of PORTF are working fine:

PORTF |= val & 8;
PORTF |= val & 4;
PORTF |= val & 2;
PORTF |= val & 1;

But I want to set single bits for the higher bits also, so it would be nice if anyone can give me a hint.

Which Arduino?

Convert each of those hex and decimal values to binary. (Use the Windows calculator in programmer mode.) What is different?

PORTF write issue (Arduino ProMicro 32u4)

I have no windows.

I've tested it with Java and a value of 170: 10101010

Result: 160, 10100000

Seems ok. But it's not working with a 32u4 and PORTF.

Should work. Can you post a complete not-working program?

What is the value of PORTF to start with? Maybe you only need:

PORTF = val & 128;

If you like to make people trying to help look stupid by editing your original post then you will not get much more help.