将十进制转换为二进制
JavaScript
Step 1: 9/2, Remainder = 1, Quotient = 4 Step 2: 4/2, Remainder = 0, Quotient = 2 Step 3: 2/2, Remainder = 0, Quotient = 1 Step 4: 1/2, Remainder = 1, Quotient = 0 Binary: 1001
使用 toString() 将十进制转换为二进制
JavaScript
Enter a decimal number: 9 Binary: 1001
We have been online since 2021 and 1 millions of people around the globe have visited our website since then
More visitors every month