Javatpoint Logo
Javatpoint Logo

PHP decbin() Function

PHP decbin() function is mathematical function, which is used to convert a decimal number to a binary number. It returns binary number.

Syntax:

Parameter Description Required/Optional
number Specify the decimal value to convert Required

Example 1

Output:

Your Decimal number is : 14
By using 'decbin()'function your Binary number is :1110

Example 2

Output:

Your Decimal number is : 3
By using 'decbin()'function your Binary number is :11

Example 3

Output:

Your Decimal number is : 1
By using 'decbin()'function your Binary number is :1

Example 4

Output:

Your Decimal number is : 1569
By using 'decbin()'function your Binary number is :11000100001

Example 5

Output:

Your Decimal number is : 7
By using 'decbin()'function your Binary number is :111

Next TopicPHP Math





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA