program correctly converst binary strings to ints