Skip to main content
deleted 29 characters in body
Source Link

PowerShell, 7373 56 49 bytes

$args|%{[convert]::tostring(+$_,2)$b=+$_
6..0}|% *ft 7 '0'|% *ay|%{+($_$c-ne$cne($c=($b-shr$_)
$c=$_%2))}

Try it online!Try it online!

-?17 bytes thanks to mazzy :)

PowerShell, 73 bytes

$args|%{[convert]::tostring(+$_,2)}|% *ft 7 '0'|% *ay|%{+($_-ne$c)
$c=$_}

Try it online!

-? bytes thanks to mazzy :)

PowerShell, 73 56 49 bytes

$args|%{$b=+$_
6..0}|%{+($c-ne($c=($b-shr$_)%2))}

Try it online!

-17 bytes thanks to mazzy :)

Source Link

PowerShell, 73 bytes

$args|%{[convert]::tostring(+$_,2)}|% *ft 7 '0'|% *ay|%{+($_-ne$c)
$c=$_}

Try it online!

-? bytes thanks to mazzy :)