Inverting binary numbers from text

Hello all
I’m a novice so sorry if this really simple to resolve
I’m trying to take a bunch of binary numbers which exist in text mode and basically have an inverted copy of them underneath each number. There’s an additional problem of spaces every 3 digits (this is a file several people have been working on) and I don’t know how to convert them into actual binary numbers.
The picture shows the numbers which are basically tags for different geometric objects, with a few
inverted numbers underneath (the geometry is hidden for privacy reasons)

Hi @smehrjui,

Here’s a grasshopper script with a simple python component that uses regular expressions to do your inversion without being fazed by the spaces. invert binaries.gh (6.4 KB)

Regards
Jeremy

1 Like