const stars = (n) => {
for (let r = 4; r >= 0; r--) {
const shift = r * 5;
const bits = (n & 31 << shift) >> shift;
console.log(Array(5).fill('').map((_, i) => bits & 1 << i ? '*' : ' ').reverse().join(''));
}
}
stars(0x1e8fa10); // P
stars(0x457e31); // A
****
* *
****
*
*
*
* *
*****
* *
* *