aarjaneiro/planetmath huggingface dataset:
the prime power dividing a factorial

the prime power dividing a factorial

In 1808, Legendre showed that the exact power of a prime

p

dividing

n

!

is

∑

i

=

1

K

⌊

n

p

i

⌋

where

K

is the largest power of

p

being

≤

n

.

Proof.

If

p

>

n

then

p

doesn’t divide

n

!

, and its power is 0, and the sum
above is
empty. So let the prime

p

≤

n

.

For each

1

≤

i

≤

K

, there are

⌊

n

p

i

⌋

-

⌊

n

p

i

+

1

⌋

numbers between 1 and

n

with

i

being the greatest power of

p

dividing each. So the power of

p

dividing

n

!

is

∑

i

=

1

K

i

⋅

(

⌊

n

p

i

⌋

-

⌊

n

p

i

+

1

⌋

)

.

But each

⌊

n

p

i

⌋

,

i

≥

2

in the
sum appears with factors

i

and

i

-

1

, so the above sum equals

∑

i

=

1

K

⁢

⌊

n

p

i

⌋

.

∎

Corollary

.

∑

k

=

1

K

⌊

n

p

K

⌋

=

n

-

δ

p

⁢

(

n

)

p

-

1

,

where

δ

p

denotes the sums of digits function in base

p

.

Proof.

If

n

<

p

, then

δ

p

⁢

(

n

)

=

n

and

⌊

n

p

⌋

is

0

=

n

-

δ

p

⁢

(

n

)

p

-

1

. So we assume

p

≤

n

.

Let

n

K

⁢

n

K

-

1

⁢

⋯

⁢

n

0

be the

p

-adic

representation

of

n

. Then

n

-

δ

p

⁢

(

n

)

p

-

1

=

∑

k

=

1

K

n

k

⁢

(

∑

j

=

0

k

-

1

p

j

)

=

∑

0

≤

j

<

k

≤

K

p

j

.

n

k

=

(

n

1

+

n

2

⁢

p

+

…

+

n

K

⁢

p

K

-

1

)

+

(

n

2

+

n

3

⁢

p

+

…

+

n

K

⁢

p

K

-

2

)

⋱

+

n

K

=

∑

k

=

1

K

⌊

n

p

k

⌋

.

∎

Title

the prime power dividing a

factorial

Canonical name

ThePrimePowerDividingAFactorial

Date of creation

2013-03-22 13:22:34

Last modified on

2013-03-22 13:22:34

Owner

Thomas Heye (1234)

Last modified by

Thomas Heye (1234)

Numerical id

10

Author

Thomas Heye (1234)

Entry type

Theorem

Classification

msc 11A51

Generated on Fri Feb 9 15:21:16 2018 by

LaTeXML
unitary divisor

unitary divisor

Given the

divisors

d

i

of an

integer

n

, if it is the case that for a particular

d

i

the equality

gcd

⁡

(

d

i

,

n

d

i

)

=

1

holds true, then

d

i

is called a

unitary divisor

of

n

. For example, the unitary divisors of 120 are 1, 3, 5, 8, 15, 24, 40, 120 (while 2, 4, 6, 10, 12, 20, 30, 60 are

proper divisors

but not unitary divisors). All the divisors of

squarefree

numbers are also unitary divisors.

Title

unitary divisor

Canonical name

UnitaryDivisor

Date of creation

2013-03-22 16:53:20

Last modified on

2013-03-22 16:53:20

Owner

CompositeFan (12809)

Last modified by

CompositeFan (12809)

Numerical id

4

Author

CompositeFan (12809)

Entry type

Definition

Classification

msc 11A51

Generated on Fri Feb 9 15:21:17 2018 by

LaTeXML
unusual number

unusual number

An

unusual number

or

n

-

rough number

n

is an

integer

with a

greatest prime factor

exceeding

n

. For example, the greatest prime factor of 102 is 17, which is greater than 11 (the

square root

of 102 rounded up to the next higher integer). The first few unusual numbers are 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 20, 21, 22, 23, 26, 28, 29, 31, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 46, 47, etc., listed in A064052 of Sloane’s OEIS. In fact, Donald Knuth and Donald Greene, who coined the term “unusual number,” remark that these numbers occur so frequently they’re not all that unusual. Unusual numbers include all of the

prime numbers

and many

composites

. Richard Schroeppel proved in HAKMEM 239 that the probability that a random integer is unusual is

log

⁡

2

(about 0.69314718).

References

1

Donald Greene & Donald Knuth,

Mathematics for the Analysis of Algorithms

, 3rd edition. Boston: Birkhäuser (1990): 95 - 98

Title

unusual number

Canonical name

UnusualNumber

Date of creation

2013-03-22 18:09:43

Last modified on

2013-03-22 18:09:43

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

4

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A51

Generated on Fri Feb 9 15:21:19 2018 by

LaTeXML
Wilson quotient

Wilson quotient

The

Wilson quotient

W

n

for a given

positive integer

n

is the

rational number

Γ

⁢

(

n

)

+

1

n

, where

Γ

⁢

(

x

)

is Euler’s Gamma function (since we’re dealing with

integer

inputs here, in effect this is merely a quicker way to write

(

n

-

1

)

!

).

From Wilson’s

theorem

it follows that the Wilson quotient is an integer only if

n

is not

composite

. When

n

is composite, the

numerator

of the Wilson quotient is

(

n

-

1

)

!

+

1

and the denominator is

n

. For example, if

n

=

7

we have numerator 721 with denominator 7, and since these have 7 as their

greatest common divisor

, in lowest terms the Wilson quotient of 7 is 103 (with 1 as tacit numerator). But for

n

=

8

we have

W

8

=

5041

8

.

References

1

R. Crandall & C. Pomerance,

Prime Numbers

: A Computational Perspective

. New York: Springer (2001): 29.

Title

Wilson quotient

Canonical name

WilsonQuotient

Date of creation

2013-03-22 17:57:47

Last modified on

2013-03-22 17:57:47

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

6

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A51

Classification

msc 11A41

Generated on Fri Feb 9 15:21:21 2018 by

LaTeXML
Woodall number

Woodall number

A

Woodall number

W

m

is a number of the form

2

m

⁢

m

-

1

, where

m

is an

integer

. It is believed that almost all Woodall numbers are

composite

. The first few Woodall numbers are 1, 7, 23, 63, 159, 383, 895, 2047, 4607 (listed in A003261 of Sloane’s OEIS). Though having some things in common with the

Cullen numbers

, no Woodall number is a

Proth number

.

Title

Woodall number

Canonical name

WoodallNumber

Date of creation

2013-03-22 17:44:18

Last modified on

2013-03-22 17:44:18

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

5

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A51

Related topic

CullenNumber

Generated on Fri Feb 9 15:21:22 2018 by

LaTeXML
Zsigmondy’s theorem

Zsigmondy’s theorem

For all

positive integers

q

>

1

and

n

>

1

, there exists a prime

p

which divides

q

n

-

1

but doesn’t divide

q

m

-

1

for

0

<

m

<

n

, except when

q

=

2

k

-

1

and

n

=

2

or

q

=

2

and

n

=

6

.

Title

Zsigmondy’s theorem

Canonical name

ZsigmondysTheorem

Date of creation

2013-03-22 13:10:44

Last modified on

2013-03-22 13:10:44

Owner

lieven (1075)

Last modified by

lieven (1075)

Numerical id

6

Author

lieven (1075)

Entry type

Theorem

Classification

msc 11A51

Synonym

Birkhoff-Vandiver theorem

Generated on Fri Feb 9 15:21:24 2018 by

LaTeXML
a few examples of solutions to Znám’s problem

a few examples of solutions to Znám’s problem

For

k

=

5

in Znám’s problem, two sets of integers can be constructed. To check each set involves calculating

k

different deleted

products

.

To check that 2, 3, 7, 47, 395 is a solution, we verify that

3

⋅

7

⋅

47

⋅

395

+

1

=

389866

, and

2

|

389866

2

⋅

7

⋅

47

⋅

395

+

1

=

259911

, and

3

|

259911

2

⋅

3

⋅

47

⋅

395

+

1

=

111391

, and

7

|

111391

2

⋅

3

⋅

7

⋅

395

+

1

=

16591

, and

47

|

16591

2

⋅

3

⋅

7

⋅

47

+

1

=

1975

, and

395

|

1975

.

To check that 2, 3, 11, 23, 31 is a solution, we verify that

3

⋅

11

⋅

23

⋅

31

+

1

=

23530

, and

2

|

23530

2

⋅

11

⋅

23

⋅

31

+

1

=

15687

, and

3

|

15687

2

⋅

3

⋅

23

⋅

31

+

1

=

4279

, and

11

|

4279

2

⋅

3

⋅

11

⋅

31

+

1

=

2047

, and

23

|

2047

2

⋅

3

⋅

11

⋅

23

+

1

=

1519

, and

31

|

1519

.

If we chose to ignore the requirement of

proper divisors

, and allow all

divisors

, then for

k

=

4

there would be the solution 2, 3, 7, 43. The verification would show that

3

⋅

7

⋅

43

+

1

=

904

, and

2

|

904

2

⋅

7

⋅

43

+

1

=

603

, and

3

|

603

2

⋅

3

⋅

43

+

1

=

259

, and

7

|

259

2

⋅

3

⋅

7

+

1

=

43

, and obviously

43

|

43

because

43

=

43

.

The vast majority of the sets in the known solutions include 2. A set is known for

k

=

13

with its smallest two

elements

being 3 and 4. It’s not known if there are any sets consisting entirely of

odd numbers

. But since 2 is a

prime number

, sets consisting entirely of prime numbers are possible, such as the second one given above, and for

k

=

7

there is 2, 3, 11, 17, 101, 149, 3109.

For a

complete

listing of solutions up to

k

=

8

, see

http://www.geocities.com/primefan/ZnamProbSols.html

PrimeFan’s listing

Title

a few examples of solutions to Znám’s problem

Canonical name

AFewExamplesOfSolutionsToZnamsProblem

Date of creation

2013-03-22 15:48:06

Last modified on

2013-03-22 15:48:06

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

6

Author

PrimeFan (13766)

Entry type

Example

Classification

msc 11A55

Generated on Fri Feb 9 15:21:27 2018 by

LaTeXML
Cahen’s constant

Cahen’s constant

Whereas a simple

addition

of

unit fractions

with the terms of Sylvester’s

sequence

as

denominators

gives as a result the

integer

1, an

alternating sum

∑

i

=

0

∞

(

-

1

)

i

a

i

-

1

(where

a

i

is the

i

th term of Sylvester’s sequence) gives the

transcendental number

known as

Cahen’s

constant

(after Eugène Cahen) with an approximate decimal value of 0.643410546288338026182254307757564763286587860268239505987 (see A118227 in Sloane’s OEIS). Alternatively, we can express Cahen’s constant as

∑

j

=

0

∞

1

a

2

⁢

j

.

The

recurrence relation

b

n

+

2

=

b

n

2

⁢

b

n

+

1

+

b

n

gives us the terms for the

continued fraction

representation of this constant:

1

+

1

b

0

2

+

1

b

1

2

+

1

b

3

2

+

⋯

Title

Cahen’s constant

Canonical name

CahensConstant

Date of creation

2013-03-22 16:24:04

Last modified on

2013-03-22 16:24:04

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

5

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A55

Synonym

Cahen constant

Generated on Fri Feb 9 15:21:29 2018 by

LaTeXML
derivation of recurrence for Sylvester’s sequence

derivation of recurrence for Sylvester’s sequence

Let us begin with the

product

:

a

n

=

1

+

∏

i

=

0

n

-

1

a

i

Adding

1

to

n

and manipulating the result:

a

n

+

1

=

1

+

∏

i

=

0

n

a

i

=

1

+

a

n

⁢

∏

i

=

0

n

-

1

a

i

=

1

+

a

n

⁢

(

a

n

-

1

)

=

1

+

(

a

n

)

2

-

a

n

Title

derivation

of recurrence for Sylvester’s

sequence

Canonical name

DerivationOfRecurrenceForSylvestersSequence

Date of creation

2013-03-22 15:48:27

Last modified on

2013-03-22 15:48:27

Owner

rspuzio (6075)

Last modified by

rspuzio (6075)

Numerical id

4

Author

rspuzio (6075)

Entry type

Derivation

Classification

msc 11A55

Generated on Fri Feb 9 15:21:31 2018 by

LaTeXML
Euler-Gompertz constant

Euler-Gompertz constant

The

Euler-Gompertz constant

is the value of the

continued fraction

C

2

=

0

+

1

1

+

1

1

+

1

1

+

2

1

+

…

,

in which after three appearances of 1 in the

numerator

position, follow the

integers

from 2 forward each given twice consecutively; the value of this constant is approximately 0.596347362323194074341078499369279376074… Finch gives two formulas for this constant:

C

2

=

-

e

⁢

Ei

⁢

(

-

1

)

=

∫

1

∞

exp

⁢

(

1

-

x

)

x

⁢

𝑑

x

,

with

e

being the

natural log base

and

Ei

being the

exponential integral

.

The constant can also be expressed as a formula involving an infinite sum:

e

⁢

(

(

∑

i

=

1

∞

(

-

1

)

i

-

1

i

!

⁢

i

)

-

γ

)

,

with

γ

being the

Euler-Mascheroni constant

.

References

1

Steven R. Finch,

Mathematical Constants

. Cambridge: Cambridge University Press (2003): 424

Title

Euler-Gompertz constant

Canonical name

EulerGompertzConstant

Date of creation

2013-03-22 18:49:06

Last modified on

2013-03-22 18:49:06

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

7

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A55

Synonym

Gompertz constant

Generated on Fri Feb 9 15:21:33 2018 by

LaTeXML
Farey pair

Farey pair

Two nonnegative reduced fractions

a

/

b

and

c

/

d

make a

Farey pair

(with

a

/

b

<

c

/

d

) whenever

b

⁢

c

-

a

⁢

d

=

1

, in other words, they are a Farey pair if their

difference

is

1

/

b

⁢

d

. The interval

[

a

/

b

,

c

/

d

]

is known as a

Farey interval.

Given a Farey pair

a

/

b

,

c

/

d

, their

mediant

is

(

a

+

c

)

/

(

b

+

d

)

. The mediant has the following

property

:

If

[

a

,

b

,

c

/

d

]

is a Farey interval, then the two subintervals obtained when inserting the mediant are also Farey pairs. Besides, between all fractions that are

strictly between

a

/

b

,

c

/

d

, the mediant is the one having the smallest denominator.

Example.

Notice that

3

/

8

and

5

/

11

form a Farey pair, since

8

⋅

5

-

3

⋅

13

=

40

-

391

. The mediant here is

8

/

21

.

Then

3

/

8

and

8

/

21

form a Farey pair:

8

⋅

8

-

3

⋅

21

=

64

-

63

=

1

.
No fraction between

3

/

8

and

5

/

11

other than

8

/

21

has a denominator smaller or equal than

21

.

Title

Farey pair

Canonical

name

FareyPair

Date of creation

2013-03-22 14:54:42

Last modified on

2013-03-22 14:54:42

Owner

drini (3)

Last modified by

drini (3)

Numerical id

6

Author

drini (3)

Entry type

Definition

Classification

msc 11A55

Related topic

ContinuedFraction

Defines

mediant

Defines

Farey interval

Generated on Fri Feb 9 15:21:34 2018 by

LaTeXML
sum of reciprocals of Sylvester’s sequence

sum of reciprocals of Sylvester’s sequence

We will show that the sum of the

reciprocals

of the Sylvester numbers indeed

converges

to 1.

Let

s

n

denote a partial sum of the series of reciprocals:

s

n

=

∑

i

0

n

-

1

1

a

i

We would like to show that

lim

n

→

∞

⁡

s

n

=

1

. Putting
over a common

denominator

, we obtain

s

n

=

∑

j

=

0

n

-

1

∏

i

≠

j

0

≤

i

<

n

a

i

∏

i

=

0

n

-

1

a

i

.

Define

b

n

as follows:

b

n

=

1

+

∑

j

=

0

n

-

1

∏

i

≠

j

0

≤

i

<

n

a

i

Using this new

definition

and the definition of the Sylvester numbers,
we can rewrite the

expression

for

s

n

as follows:

s

n

=

b

n

+

1

a

n

-

1

Let us now consider this

sequence

b

n

. We will start by deriving a

recurrence relation

:

b

n

+

1

-

1

=

∑

j

=

0

n

∏

i

≠

j

0

≤

i

<

n

+

1

a

i

=

∏

i

=

0

n

-

1

a

i

+

a

n

⁢

∑

j

=

0

n

-

1

∏

i

≠

j

0

≤

i

<

n

a

i

=

(

a

n

-

1

)

+

a

n

⁢

(

b

n

-

1

)

Simplifying, we have

b

n

+

1

=

a

n

⁢

b

n

. Now,

b

2

=

1

+

a

0

+

a

1

=

6

, hence we can solve the

recursion

with a

product

:

b

n

=

b

2

⁢

∏

i

=

2

n

-

1

a

i

=

b

2

a

0

⁢

a

1

⁢

∏

1

=

0

n

-

1

a

i

=

∏

1

=

0

n

-

1

a

i

=

a

n

-

1

Substituting this in the expression for

s

n

yields

s

n

=

a

n

a

n

-

1

.

Since

lim

n

→

∞

⁡

a

n

=

∞

,
it follows that

lim

n

→

∞

⁡

s

n

=

1

.

Title

sum of reciprocals of Sylvester’s sequence

Canonical

name

SumOfReciprocalsOfSylvestersSequence

Date of creation

2013-03-22 15:48:33

Last modified on

2013-03-22 15:48:33

Owner

rspuzio (6075)

Last modified by

rspuzio (6075)

Numerical id

7

Author

rspuzio (6075)

Entry type

Proof

Classification

msc 11A55

Generated on Fri Feb 9 15:21:39 2018 by

LaTeXML
Sylvester’s sequence

Sylvester’s sequence

Construct an

Egyptian fraction

equal to 1.

1

2

+

1

3

+

1

7

+

1

43

+

1

1807

+

⋯

The

denominators

form the

sequence

2, 3, 7, 43, 1807, … This is

Sylvester’s sequence

(listed in A58 of Sloane’s

On-Line Encyclopedia of Integer Sequences

), after the mathematician

James Joseph Sylvester

. The sequence can be calculated from the

recurrence relation

a

n

=

1

+

(

a

n

-

1

)

2

-

a

n

-

1

, with

a

0

=

2

. Knowing the terms up to

n

-

1

one can calculate

a

n

with the formula

a

n

=

1

+

∏

i

=

0

n

-

1

a

i

If the sequence was meant to construct an Egyptian fraction equal to 2, then it would be 1, 2, 3, 7, 43, 1807, … and could still be calculated by multiplying the previous terms and adding 1, but the recurrence relation given above would have to be reformulated.

Whatever the

definition

, the sequence consists of

coprime

terms, and thus can be used in Euclid’s proof of the infinity of primes. For this reason, these numbers are sometimes called

Euclid numbers

.

This sequence is useful in finding solutions to Znám’s problem.

Title

Sylvester’s sequence

Canonical

name

SylvestersSequence

Date of creation

2013-03-22 15:48:09

Last modified on

2013-03-22 15:48:09

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

6

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A55

Synonym

Euclid numbers

Synonym

Sylvester sequence

Generated on Fri Feb 9 15:21:41 2018 by

LaTeXML
Znám’s problem

Znám’s problem

Given a length

k

, is it possible to construct a set of integers

n

1

,

…

,

n

k

such that each

n

i

|

(

1

+

∏

j

≠

i

n

n

j

)

as a

proper divisor

? This is

Znám’s problem

.

This problem has solutions for

k

>

4

, and all solutions for

4

<

k

<

9

have been found, and a few for higher

k

are known. The

Sylvester sequence

provides many of the solutions. At Wayne University in 2001, Brenton and Vasiliu devised an algorithm to exhaustively search for solutions for a given length, and thus they found all solutions for

k

=

8

. Their algorithm, though smarter than a brute force search, is still computationally intense the larger

k

gets.

Solutions to the problem have applications in

continued fractions

and perfectly

weighted graphs

.

The problem is believed to have been first posed by Štefan Znám (

http://planetmath.org/VStefanZnam

) in 1972. Qi Sun proved in 1983 that there are solutions for all

k

>

4

.

References

Brenton, L, and Vasiliu, A. “Znam’s Problem.” Math. Mag.

75

, 3-11, 2002.

Title

Znám’s problem

Canonical name

ZnamsProblem

Date of creation

2013-03-22 15:47:39

Last modified on

2013-03-22 15:47:39

Owner

Mravinci (12996)

Last modified by

Mravinci (12996)

Numerical id

8

Author

Mravinci (12996)

Entry type

Definition

Classification

msc 11A55

Synonym

Znam’s problem

Generated on Fri Feb 9 15:21:43 2018 by

LaTeXML
Armstrong number

Armstrong number

Given a base

b

integer

n

=

∑

i

=

1

k

d

i

⁢

b

i

-

1

where

d

1

is the least

significant digit

and

d

k

is the most significant, if it’s also the case that for some power

m

the equality

n

=

∑

i

=

1

k

d

i

m

also holds, then

n

is an

Armstrong number

or

narcissistic number

or

plus perfect number

or

perfect digital invariant

.

In any given base

b

there is a finite amount of Armstrong numbers, since the inequality

k

⁢

(

b

-

1

)

m

>

b

k

-

1

is false after a certain threshold.

Title

Armstrong number

Canonical name

ArmstrongNumber

Date of creation

2013-03-22 16:04:06

Last modified on

2013-03-22 16:04:06

Owner

CompositeFan (12809)

Last modified by

CompositeFan (12809)

Numerical id

4

Author

CompositeFan (12809)

Entry type

Definition

Classification

msc 11A63

Synonym

narcissistic number

Synonym

plus perfect number

Synonym

perfect digital invariant

Generated on Fri Feb 9 15:21:44 2018 by

LaTeXML
automorphic number

automorphic number

Given a base

b

integer

n

=

∑

i

=

1

k

d

i

⁢

b

i

-

1

where

d

1

is the least

significant digit

and

d

k

is the most significant, if it’s also the case that the

k

least significant digits of

m

⁢

n

2

are the same of those of

n

, then

n

is called an

automorphic number

, or an

m

-

automorphic number

.

Neither

b

nor

b

+

1

can be 1-automorphic in base

b

.

Title

automorphic number

Canonical name

AutomorphicNumber

Date of creation

2013-03-22 16:20:17

Last modified on

2013-03-22 16:20:17

Owner

CompositeFan (12809)

Last modified by

CompositeFan (12809)

Numerical id

5

Author

CompositeFan (12809)

Entry type

Definition

Classification

msc 11A63

Generated on Fri Feb 9 15:21:46 2018 by

LaTeXML
bitwise AND

bitwise AND

Bitwise AND

is a bit-level operation on two binary values which indicates which bits are set in both values. For each position

i

, if and only if the bit

d

i

in both values is 1, then

d

i

of the result is also 1, othewise, it’s 0. For example, given 50 and 163 in two unsigned bytes, a bitwise AND returns 34.

0

0

1

1

0

0

1

0

AND

1

0

1

0

0

0

1

1

=

0

0

1

0

0

0

1

0

In most high-level programming languages that offer bitwise AND, the usual operator is a single ampersand (&), not to be confused with a double ampersand (&&) which performs a Boolean AND, returning a True or False value.

The

Windows Calculator

offers bitwise AND in

scientific calculator

mode, while the

Mac OS X Calculator

offers it in programmer mode.

Title

bitwise AND

Canonical

name

BitwiseAND

Date of creation

2013-03-22 17:02:46

Last modified on

2013-03-22 17:02:46

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

4

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A63

Related topic

BitwiseOR

Related topic

BitwiseXOR

Related topic

BitwiseNOT

Generated on Fri Feb 9 15:21:49 2018 by

LaTeXML
bitwise NOT

bitwise NOT

Bitwise NOT

is a bit-level operation on a single binary value that sets the bits that are off and turns off the bits that are on. For example, performing a bitwise NOT on 163 gives 92.

NOT

1

0

1

0

0

0

1

1

=

0

1

0

1

1

1

0

0

Performing a bitwise NOT on a number

n

has the same effect as performing a

bitwise XOR

on a

Mersenne number

of the form

2

k

-

1

(where

k

is the bit size of the data type in use, e.g., 8 for bytes, 16 for words, 32 for double words, etc.) and

n

. Obviously a bitwise NOT on 0 gives the largest Mersenne number that can fit in the data type in use.

The

Windows Calculator

offers bitwise NOT in

scientific calculator

mode, while the

Mac OS X Calculator

offers it in programmer mode.

Title

bitwise NOT

Canonical

name

BitwiseNOT

Date of creation

2013-03-22 17:02:55

Last modified on

2013-03-22 17:02:55

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

4

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A63

Related topic

BitwiseAND

Related topic

BitwiseOR

Related topic

BitwiseXOR

Generated on Fri Feb 9 15:21:51 2018 by

LaTeXML
bitwise OR

bitwise OR

Bitwise OR

is a bit-level operation on two binary values which indicates which bits are set in either value. For each position

i

, if the bit

d

i

in either value is 1, then

d

i

of the result is 1, otherwise it’s 0. For example, given 50 and 163 in two unsigned bytes, a bitwise OR returns 179.

0

0

1

1

0

0

1

0

OR

1

0

1

0

0

0

1

1

=

1

0

1

1

0

0

1

1

In most high-level programming languages that offer bitwise OR, the usual operator is a single pipe line (—), not to be confused with a double pipe line (——) which performs a Boolean OR, returning a True or False value.

The

Windows Calculator

offers bitwise OR in

scientific calculator

mode, while the

Mac OS X Calculator

offers it in programmer mode.

Title

bitwise OR

Canonical

name

BitwiseOR

Date of creation

2013-03-22 17:02:48

Last modified on

2013-03-22 17:02:48

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

4

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A63

Related topic

BitwiseAND

Related topic

BitwiseXOR

Related topic

BitwiseNOT

Generated on Fri Feb 9 15:21:52 2018 by

LaTeXML