How to return a bool array ?

I am trying to transform any decimal number in the range of 1 and 2^24-1 into a 24-bit binary number that I put into cardID.

For example: 86840 should return 000000010101001100111000. Next I would like to take the first 8 bits and the last 16 bits, transform them in their decimal form and store them in other variables. Now the remaining thing to do is to take the whole binary number and add its parity bits to transform it in a 26 bit Wiegand number, following the Wiegand protocol.

My ultimate goal is to make a class called Wiegand that has methods that does all this stuff.

For example:

Wiegand card("86840");
Serial.println(card.getCardID()); // should print 00121304
card.getFacilityCode(); // should print 1
// etc