How simple an 8 bit output?
Posted: Tue Aug 17, 2021 9:34 pm
wlog
e = &b00000101 ' decimal 5
f = &b10000001 ' decimal 129
wlog bin$(e), bin$(f) ' output: 101 10000001
wlog e, f ' output: 5 129
wlog
wlog str$(e, "%3.0f") ' output: 5
wlog str$(f, "%3.0f") ' output: 129
wlog str$(e, "%08x") ' output: 00000000
end
' How do I get the output for e: 00000101 ?
' Can the binary value also be integrated in the str$( ) function e.g. str$(e, "%08b") ?
e = &b00000101 ' decimal 5
f = &b10000001 ' decimal 129
wlog bin$(e), bin$(f) ' output: 101 10000001
wlog e, f ' output: 5 129
wlog
wlog str$(e, "%3.0f") ' output: 5
wlog str$(f, "%3.0f") ' output: 129
wlog str$(e, "%08x") ' output: 00000000
end
' How do I get the output for e: 00000101 ?
' Can the binary value also be integrated in the str$( ) function e.g. str$(e, "%08b") ?