Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Binary logarithm
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Exponent of a power of two}} {{good article}} {{CS1 config|mode=cs2}} {{Use mdy dates|cs1-dates=ly|date=January 2025}} [[File:Binary logarithm plot with ticks.svg|thumbnail|right|upright=1.35|Graph of {{math|log<sub>2</sub>{{hsp}}''x''}} as a function of a positive real number {{mvar|x}}]] In [[mathematics]], the '''binary logarithm''' ({{math|log<sub>2</sub>{{hsp}}''n''}}) is the [[exponentiation|power]] to which the number {{math|2}} must be [[exponentiation|raised]] to obtain the value {{mvar|n}}. That is, for any real number {{mvar|x}}, :<math>x=\log_2 n \quad\Longleftrightarrow\quad 2^x=n.</math> For example, the binary logarithm of {{math|1}} is {{math|0}}, the binary logarithm of {{math|2}} is {{math|1}}, the binary logarithm of {{math|4}} is {{math|2}}, and the binary logarithm of {{math|32}} is {{math|5}}. The binary logarithm is the [[logarithm]] to the base {{math|2}} and is the [[inverse function]] of the [[power of two]] function. There are several alternatives to the {{math|log<sub>2</sub>}} notation for the binary logarithm; see the [[#Notation|Notation]] section below. Historically, the first application of binary logarithms was in [[music theory]], by [[Leonhard Euler]]: the binary logarithm of a frequency ratio of two musical tones gives the number of [[octave]]s by which the tones differ. Binary logarithms can be used to calculate the length of the representation of a number in the [[binary numeral system]], or the number of [[bit]]s needed to encode a message in [[information theory]]. In [[computer science]], they count the number of steps needed for [[binary search]] and related algorithms. Other areas in which the binary logarithm is frequently used include [[combinatorics]], [[bioinformatics]], the design of sports [[tournament]]s, and [[photography]]. Binary logarithms are included in the standard [[C mathematical functions]] and other mathematical software packages.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)