Fix B and D in output
Change output to zeros/ones