Divide the decimal number by 2, update the decimal number to quotient until 0 and keep tracking the reminder. The reversed reminder will be the answer.
Example: Given 5 convert to a binary number, the answer is 101.
How to convert binary number to decimal number
To convert a binary number to decimal, simply sum the binary digits together.
Example: Given 100 convert to decimal number, the answer is 4.
An array is an object so it has all the same capabilities of an object plus a bunch of additional features for managing an ordered, sequential list of numbered indexes starting from 0 and going up to some length.
Array are typically used for:
An ordered list of items that are accessed by numerical index. (lots of features to manage the order of the list or to add or remove things from the list)