Reading input values and comparing to a stored array

Hello,

I am working on a project that I am reading PORTB pins 8-11 that is acting as a type of 4-bit password. The accepted 4-bit passwords are stored in an array with 10 acceptable passwords. I am trying to create a program that turns a green LED on when the password is accepted and in the stored array. When a password is rejected a red LED is on. I have my current code below, looking for any suggestions to make a working program.

Thanks for any help in advance!!

boolean Passarr[]={0010,0011,0100,0101,0111,1010,1011,1100,1101,1110};
int greenLED=12;
int redLED=13;
void setup(){
DDRB = B00110000;

}
void loop()
{
PINB=B00001111;
for(int j=0;j<9;j++)
{
if (Passarr[j]=PINB){
digitalWrite(greenLED,HIGH);
digitalWrite(redLED,LOW);
delay(20000);
}
else
{
digitalWrite(greenLED,LOW);
digitalWrite(redLED,HIGH);

}
}
}

"PORTB pins 8-10 that is acting as a type of 4-bit password"

8-9-10 is only 3 pins. Need 11 also?

CrossRoads:
"PORTB pins 8-10 that is acting as a type of 4-bit password"

8-9-10 is only 3 pins. Need 11 also?

Correct, sorry about that. Currently have 8-11 as inputs. With 12-13 as outputs for LED's

Your array has 10 values, you are only look at 9 of them.

PINB=B00001111; that does not read the port.

DATA_IN = PINB & 0b00001111;

Then compare DATA_IN to the array.

Type bool or boolean can only contain 0 or 1. You need "byte".

JCA34F:
Type bool or boolean can only contain 0 or 1. You need "byte".

Thanks!

CrossRoads:
Your array has 10 values, you are only look at 9 of them.

PINB=B00001111; that does not read the port.

DATA_IN = PINB & 0b00001111;

Then compare DATA_IN to the array.

Thank you, I am now on the right track. As seen now, I believe I have a data-type wrong