My programm reads out the first 2 Numbers of a hpgl plotfile, calculates the distance between those coordinates, and writes acordingly to the distance ones and zeros to another file.

Two long rows of 1 and 0 are created, like this:

x: y:

1 1

1 1

1 0

1 0

1 0

1 1

0 1

0 1

Now I would need to collect every 8 digits of either row (x and y)

to create hex numbers according to the binary pattern of the collected byte.

Does anyone have an idea how I could readout every 8 digits of either row?

like

x: 11111100 = FC

y: 11000111 = C7