q2K BHP
Black History Portal
THE BHP WIRE —
HIDDEN TRUTHS
What's New!
THE JOURNEY THROUGH TIME

Explore Black History

Explore the people, places, events, achievements, struggles and stories that shaped our journey.

✊🏾

Civil Rights

Movements, leaders, victories and the continuing fight for equality.

⚙️

Black Inventors

Innovation, patents, science, technology and world-changing contributions.

🏆

Sports

Pioneers, champions, Negro Leagues, records, activism and excellence.

♟️

People

Meet the people whose lives, choices and achievements shaped the journey.

📍

Places

Black towns, communities, institutions and places where history happened.

📜

Events

Moments that changed communities, movements, institutions and the nation.

Enter a person, place, event, or topic.
MY'STORY

The MOVE Fire

This is a personal recollection on the Move fire on May 13, 1985 Philadelphia police fired thousands of rounds at the MOVE house, city officials approved dropping an explosive device on the roof, the resulting fire was allowed to burn, 11 people—including five children—died, and 61 homes were destroyed. Philadelphia City Council later called it a “brutal attack carried out by the City of Philadelphia on its own citizens” and acknowledged that no individual faced criminal consequences for the bombing. One timeline correction worth preserving for the BHP record: the major previous MOVE-police confrontation was August 8, 1978, about seven years before the bombing, not a year or two earlier. Officer James Ramp was killed, other police and firefighters were wounded, nine MOVE members were later convicted, and television cameras recorded police beating Delbert Africa during his arrest. The 1985 MOVE Commission later specifically criticized city planners for failing to adequately use lessons from that 1978 confrontation. And that actually strengthens the point you’re making: 1985 did not happen without precedent or institutional memory. There had already been a deadly confrontation with MOVE, years of conflict, negotiations and police involvement before Osage Avenue.

MORE →
BLACK FACTS
The Truths They Never Taught You...

Shirley Chisholm — Unbought and Unbossed

In 1968 Shirley Chisholm became the first Black woman elected to the United States Congress. In 1972 she launched a campaign for the Democratic presidential nomination, breaking another political barrier.

MORE →
BHP gathered finds from its connected research sources. Showing the 4 strongest Black History matches.
← BACK TO RESULTS
Wikipedia

Ones' complement

Three-bit ones'-complement integers
Bits Unsigned value Ones' complement
value
000 0 0
001 1 1
010 2 2
011 3 3
100 4 −3
101 5 −2
110 6 −1
111 7 −0
8-bit ones'-complement integers
Bits Unsigned
value
Ones'
complement
value
0000 0000 0  0 
0000 0001 1  1 
0000 0010 2  2 
0111 1110 126  126 
0111 1111 127  127 
1000 0000 128  −127 
1000 0001 129  −126 
1111 1101 253  −2 
1111 1110 254  −1 
1111 1111 255  −0 
Cyclic depiction of unsigned (white ring), ones-complement (orange), twos-complement (teal) values of 4-bit integers (black) and the effect of adding 4 to an arbitrary value

The ones' complement of a binary number is the value obtained by inverting (flipping) all the bits in the number (that is, changing each 1 to a 0 and each 0 to a 1). The name "ones' complement"[1] refers to the fact that such an inverted value, if added to the original, would always produce an "all ones" number (the term "complement" refers to such pairs of mutually additive inverse numbers, here in respect to a non-0 base number). This mathematical operation is primarily of interest in computer science, where it has varying effects depending on how a specific computer represents numbers.

A ones' complement system or ones' complement arithmetic is a system in which negative numbers are represented by the inverse of the binary representations of their corresponding positive numbers. In such a system, a number is negated (converted from positive to negative or vice versa) by computing its ones' complement. An N-bit ones' complement numeral system can represent integers in the range −(2N−1−1) to 2N−1−1; in contrast, a two's complement numeral system can represent integers in the range −2N−1 to 2N−1−1 (note that the range of negative integers is larger by one). It is one of three common representations for negative integers in binary computers, along with two's complement and sign-magnitude.

The ones' complement binary numeral system is characterized by the bit complement of any integer value being the arithmetic negative of the value. That is, inverting all of the bits of a number (the logical complement) produces the same result as subtracting the value from 0.

Many early computers, e.g., the UNIVAC 1101, CDC 160, CDC 1604, CDC 6600, LINC, DEC PDP-1, UNIVAC 1107, and their successors, used ones' complement arithmetic. Successors of the CDC 6600 continued to use ones' complement arithmetic until the late 1980s, and the descendants of the UNIVAC 1107 (the UNIVAC 1100/2200 and Unisys ClearPath Dorado series) continue to use ones' complement,[2] but all modern computers use two's complement. (Current Unisys ClearPath Dorado machines emulate the ones' complement 36-bit instruction set on two's complement processors.)

Programming language standards such as C++20 and C23 require two's complement and disallow other representations such as ones' complement.[3]

Number representation

[edit]

Positive numbers are the same simple, binary system used by two's complement and sign-magnitude. Negative values are the bit complement of the corresponding positive value. The largest positive value is characterized by the sign (high-order) bit being off (0) and all other bits being on (1). The lowest negative value is characterized by the sign bit being 1, and all other bits being 0. The table below shows all possible values in a four-bit system, from −7 to +7.

    +      −
0  0000  1111 — Both +0 and −0 return TRUE when tested for zero
1  0001  1110 — and FALSE when tested for non-zero. 
2  0010  1101
3  0011  1100
4  0100  1011
5  0101  1010
6  0110  1001
7  0111  1000

Basics

[edit]

Adding two values is straightforward. Simply align the values on the least significant bit and add, propagating any carry to the bit one position left. If the carry extends past the end of the word it is said to have "wrapped around", a condition called an "end-around carry". When this occurs, the bit must be added back in at the right-most bit. This phenomenon does not occur in two's complement arithmetic.

  0001 0110     22
+ 0000 0011      3
===========   ====
  0001 1001     25

Adding a negative number to a larger positive number produces an end around carry.[4]

  0100 1001     4105
+ 1100 0000    -4095
===========   ======
1 0000 1001        9   - Adding in binary gives the number 9 and an end around borrow
+ 0000 0001        1   - Add the carry bit
===========   ======
  0000 1010       10   - Correct result

Subtraction is similar, except that borrows, rather than carries, are propagated to the left. If the borrow extends past the end of the word it is said to have "wrapped around", a condition called an "end-around borrow". When this occurs, the bit must be subtracted from the right-most bit. This phenomenon does not occur in two's complement arithmetic.

  0000 0110      6
− 0001 0011     19
===========   ====
1 1111 0011    −12    —An end-around borrow is produced, and the sign bit of the intermediate result is 1.
− 0000 0001      1    —Subtract the end-around borrow from the result.
===========   ====
  1111 0010    −13    —The correct result (6 − 19 = −13)

It is easy to demonstrate that the bit complement of a positive value is the negative magnitude of the positive value. The computation of 19 + 3 produces the same result as 19 − (−3).

Add 3 to 19.

  0001 0011     19
+ 0000 0011      3
===========   ====
  0001 0110     22

Subtract −3 from 19.

  0001 0011     19
− 1111 1100     −3
===========   ====
1 0001 0111     23    —An end-around borrow is produced.
− 0000 0001      1    —Subtract the end-around borrow from the result.
===========   ====
  0001 0110     22    —The correct result (19 − (−3) = 22).

Negative zero

[edit]

Negative zero is the condition where all bits in a signed word are 1. This follows the ones' complement rules that a value is negative when the left-most bit is 1, and that a negative number is the bit complement of the number's magnitude. The value also behaves as zero when computing. Adding or subtracting negative zero to/from another value produces the original value.

Adding negative zero:

  0001 0110     22
+ 1111 1111     −0
===========   ====
1 0001 0101     21    An end-around carry is produced.
+ 0000 0001      1
===========   ====
  0001 0110     22    The correct result (22 + (−0) = 22)

Subtracting negative zero:

  0001 0110     22
− 1111 1111     −0
===========   ====
1 0001 0111     23    An end-around borrow is produced.
− 0000 0001      1
===========   ====
  0001 0110     22    The correct result (22 − (−0) = 22)

Negative zero is easily produced in a ones' complement adder. Simply add the positive and negative of the same magnitude.

  0001 0110     22
+ 1110 1001    −22
===========   ====
  1111 1111     −0    Negative zero.

Although the math always produces the correct results, a side effect of negative zero is that software must test for negative zero.

Avoiding negative zero

[edit]

The generation of negative zero becomes a non-issue if addition is achieved with a complementing subtractor. The first operand is passed to the subtract unmodified, the second operand is complemented, and the subtraction generates the correct result, avoiding negative zero. The previous example added 22 and −22 and produced −0.

  0001 0110     22         0001 0110     22            1110 1001  −22         1110 1001   −22
+ 1110 1001    −22       − 0001 0110     22          + 0001 0110   22       − 1110 1001   −22
===========   ====  but  ===========   ====   ; and  ===========  ===  but  ===========   ===
  1111 1111     −0         0000 0000      0            1111 1111   −0         0000 0000     0

"Corner cases" arise when one or both operands are zero and/or negative zero.

  0001 0010     18         0001 0010     18
− 0000 0000      0       − 1111 1111     −0
===========   ====       ===========   ====
  0001 0010     18       1 0001 0011     19
                         − 0000 0001      1
                         ===========   ====
                           0001 0010     18

Subtracting +0 is trivial (as shown above). If the second operand is negative zero it is inverted and the original value of the first operand is the result. Subtracting −0 is also trivial. The result can be only one of two cases. In case 1, operand 1 is −0 so the result is produced simply by subtracting 1 from 1 at every bit position. In case 2, the subtraction will generate a value that is 1 larger than operand 1 and an end-around borrow. Completing the borrow generates the same value as operand 1.

The next example shows what happens when both operands are plus or minus zero:

  0000 0000      0         0000 0000      0         1111 1111     −0         1111 1111     −0
+ 0000 0000      0       + 1111 1111     −0       + 0000 0000      0       + 1111 1111     −0
===========   ====       ===========   ====       ===========   ====       ===========   ====
  0000 0000      0         1111 1111     −0         1111 1111     −0       1 1111 1110     −1
                                                                           + 0000 0001      1
                                                                           ==================
                                                                             1111 1111     −0
  0000 0000      0         0000 0000      0         1111 1111     −0         1111 1111     −0
− 1111 1111     −0       − 0000 0000      0       − 1111 1111     −0       − 0000 0000      0
===========   ====       ===========   ====       ===========   ====       ===========   ====
1 0000 0001      1         0000 0000      0         0000 0000      0         1111 1111     −0
− 0000 0001      1
===========   ====
  0000 0000      0

This example shows that of the four possible conditions when adding only ±0, an adder will produce −0 in three of them. A complementing subtractor will produce −0 only when the first operand is −0 and the second is 0.

See also

[edit]

References

[edit]
  1. ^ Knuth, Donald E. (1982). "4.1. Positional Number Systems". The Art of Computer Programming, Volume 2: Seminumerical Algorithms (3rd ed.). Reading, Mass: Addison-Wesley. pp. 203–204. ISBN 0-201-03801-3. Detail-oriented readers and copy editors should notice the position of the apostrophe in terms like 'two's complement' and 'ones' complement': A two's complement number is complemented with respect to a single power of 2, while a ones' complement number is complemented with respect to a long sequence of 1s.
  2. ^ "Is there any existing CPU implementation which uses one's complement?". Super User. Retrieved 2026-09-25.
  3. ^ "Changes between C++17 and C++20". www.open-std.org. Retrieved 2026-09-25.
  4. ^ "What is 1's complement addition? Flogex 21 May 2021". Stack Overflow. Retrieved 2026-10-10.

Source: Wikipedia. Article content is retrieved live through the MediaWiki API.

Wikipedia

Ones' complement

The ones' complement of a binary number is the value obtained by inverting (flipping) all the bits in the number (that is, changing each 1 to a 0 and each 0 to a 1). The name "ones' complement" refers to the fact that such an inverted value, if added to the original, would always produce an "all ones" number (the term "complement" refers to such pairs of mutually additive inverse numbers, here in respect to a non-0 base number). This mathematical operation is primarily of interest in computer science, where it has varying effects depending on how a specific computer represents numbers. A ones' complement system or ones' complement arithmetic is a system in which negative numbers are represented by the inverse of the binary representations of their corresponding positive numbers. In such a system, a number is negated (converted from positive to negative or vice versa) by computing its ones' complement. An N-bit ones' complement numeral system can represent integers in the range −(2N−1−1) to 2N−1−1; in contrast, a two's complement numeral system can represent integers in the range −2N−1 to 2N−1−1 (note that the range of negative integers is larger by one). It is one of three common representations for negative integers in binary computers, along with two's complement and sign-magnitude. The ones' complement binary numeral system is characterized by the bit complement of any integer value being the arithmetic negative of the value. That is, inverting all of the bits of a number (the logical complement) produces the same result as subtracting the value from 0. Many early computers, e.g., the UNIVAC 1101, CDC 160, CDC 1604, CDC 6600, LINC, DEC PDP-1, UNIVAC 1107, and their successors, used ones' complement arithmetic. Successors of the CDC 6600 continued to use ones' complement arithmetic until the late 1980s, and the descendants of the UNIVAC 1107 (the UNIVAC 1100/2200 and Unisys ClearPath Dorado series) continue to use ones' complement, but all modern computers use two's complement. (Current Unisys ClearPath Dorado machines emulate the ones' complement 36-bit instruction set on two's complement processors.) Programming language standards such as C++20 and C23 require two's complement and disallow other representations such as ones' complement.

MORE →
Wikipedia

Negation

In logic, negation, also called the logical not or logical complement, is an operation that takes a proposition P {\displaystyle P} to another proposition "not P {\displaystyle P} ", written ¬ P {\displaystyle \neg P} , ∼ P {\displaystyle {\mathord {\sim }}P} , P ′ {\displaystyle P^{\prime }} or P ¯ {\displaystyle {\overline {P}}} . It is interpreted intuitively as being true when P {\displaystyle P} is false, and false when P {\displaystyle P} is true. For example, if P {\displaystyle P} is "The dog runs", then "not P {\displaystyle P} " is "The dog does not run". An operand of a negation is called a negand or negatum. Negation is a unary logical connective. It may furthermore be applied not only to propositions, but also to notions, truth values, or semantic values more generally. In classical logic, negation is normally identified with the truth function that takes truth to falsity (and vice versa). In intuitionistic logic, according to the Brouwer–Heyting–Kolmogorov interpretation, the negation of a proposition P {\displaystyle P} is the proposition whose proofs are the refutations of P {\displaystyle P} .

MORE →
Wikipedia

Tube sound

Tube sound (or valve sound) is the characteristic sound associated with a vacuum tube amplifier. The concept of tube sound did not exist prior to the invention of transistors, as all electronic amplification of audio signals used vacuum tubes. After the introduction of solid-state amplifiers, tube sound became the logical complement of transistor sound, which had some negative connotations due to crossover distortion in early transistor amplifiers. Modern solid-state amplifiers are made with a neutral sound compared to tube amplifiers; thus, tube sound typically refers to euphonic distortion now associated with tube amplification. The audible significance of tube amplification on audio signals is a subject of continuing debate among audio enthusiasts. Even though tube amplifiers are generally more expensive than solid-state devices, tube instrument amplifiers are still preferred by many musicians for electric guitar, electric bass, and keyboards. Additionally, some audiophiles prefer tube amplification for listening to prerecorded music.

MORE →
Wikipedia

Flip-flop (electronics)

In electronics, flip-flops and latches are circuits that have two stable states that can store state information – a bistable multivibrator. The circuit can be made to change state by signals applied to one or more control inputs and will output its state (often along with its logical complement). It is the basic storage element in sequential logic. Flip-flops and latches are fundamental building blocks of digital electronics systems used in computers, communications, and many other types of systems. Flip-flops and latches are used as data storage elements to store a single bit (binary digit) of data; one of its two states represents a one and the other represents a zero. Such data storage can be used for storage of state, and such a circuit is described as sequential logic in electronics. When used in a finite-state machine, the output and next state depend not only on its current input, but also on its current state (and hence, previous inputs). It can also be used for counting of pulses, and for synchronizing variably-timed input signals to some reference timing signal. The term flip-flop has historically referred generically to both level-triggered (asynchronous, transparent, or opaque) and edge-triggered (synchronous, or clocked) circuits that store a single bit of data using gates. Modern authors reserve the term flip-flop exclusively for edge-triggered storage elements and latches for level-triggered ones. The terms edge-triggered, and level-triggered may be used to avoid ambiguity. When a level-triggered latch is enabled, it becomes transparent, but an edge-triggered flip-flop's output only changes on a clock edge (either positive going or negative going). Different types of flip-flops and latches are available as integrated circuits, usually with multiple elements per chip. For example, 74HC75 is a quadruple transparent latch in the 7400 series.

MORE →
TOPIC OF THE DAY

Greenwood / Black Wall Street

Before the 1921 destruction of Tulsa’s Greenwood District, Black residents had created a remarkable center of business and community life. The district included stores, professional offices, entertainment venues and homes owned by Black citizens. Understanding Greenwood means learning what was built—not only what was burned.

MORE →
TRIVIA QUESTION OF THE DAY

What prosperous Tulsa district became widely known as “Black Wall Street”?

The Greenwood District.