Beginner's Programming Tutorial in QBasic

(Kiana) #1
2122 = Thirty three = Thirty four
23 = Thirty five

(^24). = Thirty six
.
.
In the decimal system (base 10), we multiply ten for each time a digit goes to the left.
10 = 10 100 = 10 10
1000 = 10
10 10
10000 = 10
10 10 10.
..
But in the hexadecimal (base 16) system, we multiply sixteen , instead.
10 100 = 16 (16) = 16 16 (256)
100001000 = 16
16 16 (4096) = 16 16 16 16 (65536)
.
..
Therefore, since 10 is 16 and 100 is 256, the number 110 is two hundred and seventy two
(272).
110 = ( 100 + 10 ) = (256 + 16) = 272
(To download a number converter, click here.)
TIP: To enter a hexadecimal number in QBasic,
use &H.
&H110


Binary numbers


The "binary" system (base 2) can only have two digits, 0 and 1. Therefore, no binary number has
a digit between 2 and 9.

Free download pdf