As you are new start with low code methods, as you advance and feel more confident you can introduce code.
here is a low code example, but take Steve's advise and watch the essential videos.
[{"id":"f916b186a40d0ca1","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload.output","v":"10010100","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":210,"y":7540,"wires":[["7e19471fa95e50e1"]]},{"id":"7e19471fa95e50e1","type":"split","z":"d1395164b4eec73e","name":"","splt":"1","spltType":"len","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","property":"payload.output","x":350,"y":7540,"wires":[["da7d9d98a29c3151","24e9e6c7ef8caee9"]]},{"id":"da7d9d98a29c3151","type":"switch","z":"d1395164b4eec73e","name":"","property":"payload.output","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":470,"y":7540,"wires":[["4c6218d6960c47ca"],["bac4a41f2fe99b7d"]]},{"id":"24e9e6c7ef8caee9","type":"debug","z":"d1395164b4eec73e","name":"lsee full message","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":464.2021179199219,"y":7489.7333984375,"wires":[]},{"id":"4c6218d6960c47ca","type":"change","z":"d1395164b4eec73e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":7520,"wires":[["c4a9adb6ee24b8e7"]]},{"id":"bac4a41f2fe99b7d","type":"change","z":"d1395164b4eec73e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":7560,"wires":[["c4a9adb6ee24b8e7"]]},{"id":"c4a9adb6ee24b8e7","type":"switch","z":"d1395164b4eec73e","name":"","property":"parts.index","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","vt":"num"}],"checkall":"false","repair":false,"outputs":3,"x":490,"y":7660,"wires":[["958cf7df0bfeaa37"],["a80d474f6bde337d"],["63328b91ba3adb0a"]]},{"id":"958cf7df0bfeaa37","type":"debug","z":"d1395164b4eec73e","name":"led 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":7640,"wires":[]},{"id":"a80d474f6bde337d","type":"debug","z":"d1395164b4eec73e","name":"led 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":7680,"wires":[]},{"id":"63328b91ba3adb0a","type":"debug","z":"d1395164b4eec73e","name":"led 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":7720,"wires":[]}]
How to import/export a flow