Have a look at this PDF:
"4 Phase 12-Volt 75 Ohm Unipolar Stepper Motor" https://www.rambal.com/product/motor/Unipolar_Stepper_Motor_1_1.PDF
This article should give good idea on how to control 4-phase (5-wire) unipolar stepper motor ..
( just to remind you expression %11110000 means that pins 7, 6, 5 and 4 are a "1") ..