Difference between revisions of "Binary Numbers"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
 
 
<!-- GIDEROSOBJ:Binary Numbers -->
 
<!-- GIDEROSOBJ:Binary Numbers -->
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/>
+
'''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/>
'''<translate>Available since</translate>:''' Gideros 2017.10<br/>
+
'''Available since:''' Gideros 2017.10<br/>
=== <translate>Description</translate> ===
 
<translate><br />
 
Binary number representation.<br /><br />
 
  
<b>0b</b>BinaryPattern &emsp; Enter a number in binary format.<br /></translate>
+
=== Description ===
=== <translate>Examples</translate> ===
+
Binary number representation.
'''Simple examples'''<br/>
+
 
<syntaxhighlight lang="lua">  
+
<b>0b</b>BinaryPattern, enter a number in binary format
 +
 
 +
=== Examples ===
 +
<syntaxhighlight lang="lua">
 
a=0b00000001 -- a = 1
 
a=0b00000001 -- a = 1
 +
print(a)
 
a=0b00000010 -- a = 2
 
a=0b00000010 -- a = 2
 +
print(a)
 
a=0b00000011 -- a = 3
 
a=0b00000011 -- a = 3
 +
print(a)
 
a=0b00000100 -- a = 4
 
a=0b00000100 -- a = 4
 +
print(a)
 
a=0b00000101 -- a = 5
 
a=0b00000101 -- a = 5
 +
print(a)
 
a=0b00000110 -- a = 6
 
a=0b00000110 -- a = 6
 +
print(a)
 
a=0b00000111 -- a = 7
 
a=0b00000111 -- a = 7
 +
print(a)
 
a=0b00001000 -- a = 8
 
a=0b00001000 -- a = 8
a=0b00001001 -- a = 9</source>
+
print(a)
{|-
+
a=0b00001001 -- a = 9
| style="width: 50%; vertical-align:top;"|
+
print(a)
=== <translate>Methods</translate> ===
+
</syntaxhighlight>
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Events</translate> ===
 
=== <translate>Constants</translate> ===
 
|}
 
  
 
{{GIDEROS IMPORTANT LINKS}}
 
{{GIDEROS IMPORTANT LINKS}}

Latest revision as of 02:56, 1 December 2023

Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.png
Available since: Gideros 2017.10

Description

Binary number representation.

0bBinaryPattern, enter a number in binary format

Examples

a=0b00000001 -- a = 1
print(a)
a=0b00000010 -- a = 2
print(a)
a=0b00000011 -- a = 3
print(a)
a=0b00000100 -- a = 4
print(a)
a=0b00000101 -- a = 5
print(a)
a=0b00000110 -- a = 6
print(a)
a=0b00000111 -- a = 7
print(a)
a=0b00001000 -- a = 8
print(a)
a=0b00001001 -- a = 9
print(a)