Here is a quick demo of buffer-parser output options...
(note i simply cannot get 31
from [ 1, 1, 1, 1, 0, 0, 0, 0 ]
no matter how i do the conversions)
Demo
The input is a buffer containing [ 1, 1, 1, 1, 0, 0, 0, 0 ]
(to simulate your data)
flow 1 - output an object of key/value (ideal for further calculations where you need all values in same message)
flow 2 - output multiple values (with topic) from one output (ideal for sending to MQTT)
flow 3 - output multiple values from individual outputs (ideal for sending values down different paths)
Demo flow...
[{"id":"f0cabe4a.c6b24","type":"inject","z":"942b70c6.58cc6","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[ 1, 1, 1, 1, 0, 0, 0, 0 ]","payloadType":"bin","x":1250,"y":192,"wires":[["259d1e83.d42762"]]},{"id":"259d1e83.d42762","type":"buffer-parser","z":"942b70c6.58cc6","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"int16be","name":"int16_1","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"int16be","name":"int16_2","offset":2,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"int16be","name":"int16_3","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"int16be","name":"int16_4","offset":6,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint32le","name":"uint32_1","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint32le","name":"uint32_2","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"output","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":1448,"y":192,"wires":[["333dafcd.a18d9"]]},{"id":"333dafcd.a18d9","type":"debug","z":"942b70c6.58cc6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1656,"y":192,"wires":[]},{"id":"47648ca4.4108d4","type":"inject","z":"942b70c6.58cc6","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[ 1, 1, 1, 1, 0, 0, 0, 0 ]","payloadType":"bin","x":1252,"y":364,"wires":[["ddd70f53.3e54f"]]},{"id":"ddd70f53.3e54f","type":"buffer-parser","z":"942b70c6.58cc6","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"int16be","name":"int16_1","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"int16be","name":"int16_2","offset":2,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"int16be","name":"int16_3","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"int16be","name":"int16_4","offset":6,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint32le","name":"uint32_1","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint32le","name":"uint32_2","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"output","multipleResult":true,"fanOutMultipleResult":true,"setTopic":true,"outputs":6,"x":1448,"y":364,"wires":[["b849e846.3c03c8"],["bab2dca5.0d18c"],["6b293bc3.521c14"],["276b03ee.b9adac"],["fa1a116c.b604c"],["bee97cc7.7118"]]},{"id":"b849e846.3c03c8","type":"debug","z":"942b70c6.58cc6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1656,"y":288,"wires":[]},{"id":"856625c2.6c7a38","type":"buffer-parser","z":"942b70c6.58cc6","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"int16be","name":"int16_1","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"int16be","name":"int16_2","offset":2,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"int16be","name":"int16_3","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"int16be","name":"int16_4","offset":6,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint32le","name":"uint32_1","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint32le","name":"uint32_2","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"output","multipleResult":true,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":1448,"y":240,"wires":[["30c500dc.3dc7b"]]},{"id":"d8144dca.9f29a","type":"inject","z":"942b70c6.58cc6","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[ 1, 1, 1, 1, 0, 0, 0, 0 ]","payloadType":"bin","x":1250,"y":240,"wires":[["856625c2.6c7a38"]]},{"id":"30c500dc.3dc7b","type":"debug","z":"942b70c6.58cc6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1656,"y":240,"wires":[]},{"id":"bab2dca5.0d18c","type":"debug","z":"942b70c6.58cc6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1656,"y":320,"wires":[]},{"id":"6b293bc3.521c14","type":"debug","z":"942b70c6.58cc6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1656,"y":352,"wires":[]},{"id":"276b03ee.b9adac","type":"debug","z":"942b70c6.58cc6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1656,"y":384,"wires":[]},{"id":"fa1a116c.b604c","type":"debug","z":"942b70c6.58cc6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1656,"y":416,"wires":[]},{"id":"bee97cc7.7118","type":"debug","z":"942b70c6.58cc6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1656,"y":448,"wires":[]}]