How to read GPIO as binary

I am a newcomer to Node-Red but learning all the time and managed to get a few things up and running on the dashboard on my Pi.

However my next goal is to read an 8 bit binary code as input to 8 GPIO pins on my Pi, and then turn it into a decimal code(0-255).

It sounds simple but not sure to start. Any ideas/advice welcomed!

Method:
Sum(Gpio1x1, Gpio2x2,Gpio3x4,......Gpio8x128) lowest to highest bit.

Thanks @ghayne I get your principle to do the math. But I have problem adding the numbers in a function. How do I read the gpio status (and add) all 8 all at once? .

No need for a function node, think flow context variables using a change node. Cannot give you an example as I am away from a node-red machine.

Feed all the inputs into a Join node configured something like this

The effect is that whenever an input changes, then 0.1 second later (to give any other changed inputs time to arrive) it will send a message with all 8 values in the payload, identified by their pin numbers. You might need to play with the delay.

Thanks @Colin I have this running now.