Back in the day when we used to do 'Code Challenges' on the forum, I create an LCD display thingy that uses bit flagging and bit manipulation.
It doesn't need media, so you can run it as it is, see what it does and then check the code for how I played with the bits.
SetWindowSize( 1024, 500, 0 )
SetVirtualResolution( 1024, 500 )
global digit as integer[46]=[64,0,0,63,384,91,79,102,109,125,7,127,111,0,0,0,0,0,0,0,119,127,57,63,121,113,61,118,384,15,244,56,439,55,63,115,575,371,109,385,62,62,318,118,354,91]
global day as string[6] = ["SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY"]
do
DisplayLEDtext(50, 50, 30, "SCRAGGLES DIGITAL DISPLAY", 255, 32, 32)
DisplayLEDtext(120, 175, 75, GetCurrentTime(), 32, 196, 255)
DisplayLEDtext(600, 400, 30, day[GetDayOfWeek()], 32, 255, 32)
DisplayLEDtext(100, 400, 30, FlipDateOrder(), 255, 196, 32)
Sync()
loop
function DisplayLEDtext(x#, y#, sz#, t$, r, g, b)
c1 = MakeColor(r, g, b)
c2 = MakeColor(r>>3, g>>3, b>>3)
for k = 0 to len(t$)-1
_DrawLED(x#+(k*sz#*1.25), y#, sz#, sz#*2, mid(upper(t$),k+1,1), c1, c2)
next k
endfunction
function _DrawLED(x#, y#, w#, h#, v$, c1, c2 )
s# = w#*0.125
v = abs(asc(v$)-45)
col as integer[1]
col[0] = c1
col[1] = c2
if asc(v$)=58
cc = col[mod(val(right(GetCurrentTime(), 1)),2)]
DrawBox(x#+w#*0.5-s#, y#+w#*0.5-s#, x#+w#*0.5+s#, y#+w#*0.5+s#, cc, cc, cc, cc, 1)
DrawBox(x#+w#*0.5-s#, y#+w#*1.5-s#, x#+w#*0.5+s#, y#+w#*1.5+s#, cc, cc, cc, cc, 1)
exitfunction
endif
c as integer[9]
b = 1
for k = 0 to 9
c[k] = col[digit[v]&&b=0]
b=b<<1
next k
DrawBox(x#, y#, x#+w#, y#+s#, c[0], c[0], c[0], c[0], 1)
DrawBox(x#+w#-s#, y#, x#+w#, y#+w#, c[1], c[1], c[1], c[1], 1)
DrawBox(x#+w#-s#, y#+w#, x#+w#, y#+w#*2, c[2], c[2], c[2], c[2], 1)
DrawBox(x#, y#+w#*2-s#, x#+w#, y#+w#*2, c[3], c[3], c[3], c[3], 1)
DrawBox(x#, y#+w#*2, x#+s#, y#+w#, c[4], c[4], c[4], c[4], 1)
DrawBox(x#, y#, x#+s#, y#+w#, c[5], c[5], c[5], c[5], 1)
DrawBox(x#, y#+w#-s#*0.5, x#+w#, y#+w#+s#*0.5, c[6], c[6], c[6], c[6], 1)
DrawBox(x#+w#*0.5-s#*0.5, y#+s#, x#+w#*0.5+s#*0.5, y#+w#-s#, c[7], c[7], c[7], c[7], 1)
DrawBox(x#+w#*0.5-s#*0.5, y#+s#+w#, x#+w#*0.5+s#*0.5, y#+w#*2-s#, c[8], c[8], c[8], c[8], 1)
DrawBox(x#+w#-s#*2, y#+w#*2-s#*2.5, x#+w#-s#, y#+w#*2-s#, c[9], c[9], c[9], c[9], 1)
endfunction
function FlipDateOrder()
dt$ = GetCurrentDate()
d$ = right(dt$, 2)+"-"+mid(dt$,6,2)+"-"+left(dt$,4)
endfunction d$