Machine learning Classification model for binary input and output data
Your problem is one of "sequence classification" for which Recurrent Neural Networks (RNN) e.g. Long short-term memory (LSTM) are generally used. 

See here for a good example: https://machinelearningmastery.com/sequence-classification-lstm-recurrent-neural-networks-python-keras/

and here for a technical paper: https://www.cs.sfu.ca/~jpei/publications/Sequence%20Classification.pdf

Here is a specialized package for sequence classification which uses convolutional neural network (CNN): https://github.com/aajanki/sequence-classification

CPT algorithm, an accurate method for sequence prediction, can also be used here: https://www.analyticsvidhya.com/blog/2018/04/guide-sequence-prediction-using-compact-prediction-tree-python/ A continous output can easily be rounded to 0 or 1 to get binary result.