Binary program analysis has important applications in software security, error detection, and debugging techniques. We have developed techniques to perform dynamic and static binary analysis, for example, building symbolic formula to represent how a program processes inputs. In this talk, we discuss several of our solutions in applying such techniques to compare software for error detection and software debugging. First, we introduce an automated approach to detect software errors by finding deviations in two implementations of a specification, i.e., differences in the way they process their inputs. We show how symbolic formula can be used to compare programs effectively to reveal deviations. Second, we show an approach for debugging software errors in evolving programs or programs from the same specification. Given two programs (a reference, stable program and a new, modified program) and an input that fails on the modified program, our approach uses concrete as well as symbolic execution to synthesize new inputs that differ marginally from the failing input in their control flow behavior. A comparison of the execution traces of the failing input and the new inputs provides critical clues to the root-cause of the failure. We also introduce the underlying binary analysis platform, BitBlaze, and its other applications in debugging and system security.