Binary programming and test design