here is a example of joining incoming i/0 in to a object, then converting to a binary string and outputting a hex string.
the incoming gpio need topics link in the inject nodes.
[{"id":"33a4a125.5feda6","type":"inject","z":"c791cbc0.84f648","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"gpio1","payload":"1","payloadType":"num","x":90,"y":4360,"wires":[["f1206efe.98776"]]},{"id":"f1206efe.98776","type":"join","z":"c791cbc0.84f648","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"4","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":310,"y":4580,"wires":[["901640e3.170d88"]]},{"id":"d3409c04.3ffeb","type":"inject","z":"c791cbc0.84f648","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"gpio1","payload":"0","payloadType":"num","x":100,"y":4400,"wires":[["f1206efe.98776"]]},{"id":"6717ce0b.5720f8","type":"inject","z":"c791cbc0.84f648","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"gpio2","payload":"1","payloadType":"num","x":80,"y":4480,"wires":[["f1206efe.98776"]]},{"id":"b96edc6b.f39de8","type":"inject","z":"c791cbc0.84f648","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"gpio2","payload":"0","payloadType":"num","x":80,"y":4520,"wires":[["f1206efe.98776"]]},{"id":"55548b7e.06c7cc","type":"inject","z":"c791cbc0.84f648","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"gpio3","payload":"1","payloadType":"num","x":90.33332824707031,"y":4583.66650390625,"wires":[["f1206efe.98776"]]},{"id":"189d1c22.ef16b4","type":"inject","z":"c791cbc0.84f648","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"gpio3","payload":"0","payloadType":"num","x":100.33332824707031,"y":4623.66650390625,"wires":[["f1206efe.98776"]]},{"id":"4b6d363.10c3c48","type":"inject","z":"c791cbc0.84f648","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"gpio4","payload":"1","payloadType":"num","x":100,"y":4680,"wires":[["f1206efe.98776"]]},{"id":"dbb44363.c19a5","type":"inject","z":"c791cbc0.84f648","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"gpio4","payload":"0","payloadType":"num","x":110,"y":4720,"wires":[["f1206efe.98776"]]},{"id":"901640e3.170d88","type":"function","z":"c791cbc0.84f648","name":"","func":"msg.payload = parseInt(Object.values(msg.payload).reverse().join(\"\"), 2).toString(16);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":470,"y":4580,"wires":[["5e428022.edd948"]]},{"id":"5e428022.edd948","type":"debug","z":"c791cbc0.84f648","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":670,"y":4580,"wires":[]}]