# US 11,029,920 B1 · Execution of a conditional statement by an arithmetic and/or bitwise unit

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,029,920 B1
- Document ID: US11029920B1
- Status: Granted
- Kind: B1
- Application number: 17/076,726
- Filed: 2020-10-21
- Granted: 2021-06-08
- Earliest claimed: 2020-10-21
- Assignees: Chariot Technologies Lab, Inc.
- Applicants: Chariot Technologies Lab, Inc.
- Inventors: Timur Ryspekov
- Web page: https://patentgrep.com/patent/US11029920B1

## CPC

- G06F 7/57: Arithmetic logic units [ALU], i.e. arrangements or devices for performing two or more of the operations covered by groups G06F7/483 – G06F7/556 or for performing logical operations {(G06F7/49, G06F7/491 take precedence)}
- G06F 8/443: {Optimisation}
- G06F 8/4441: {Reducing the execution time required by the program code}
- G06F 9/30072: {to perform conditional operations, e.g. using predicates or guards}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for execution of a conditional statement by an arithmetic and/or bitwise unit. A computer program that comprises a conditional statement that comprises a boolean condition is accessed. The boolean condition is transformed into an arithmetic and/or bitwise expression of the boolean condition. An arithmetic and/or bitwise expression of the computer program comprises the arithmetic and/or bitwise expression of the boolean condition in place of the boolean condition. The arithmetic and/or bitwise expression of the computer program is executed by an arithmetic and/or bitwise operation unit of a processor.

## Claims

### Claim 1

A method comprising:
accessing a computer program, wherein the computer program comprises a conditional statement that comprises a boolean condition;
transforming the boolean condition into an arithmetic and/or bitwise expression of the boolean condition;
generating an arithmetic and/or bitwise expression of the computer program comprising the arithmetic and/or bitwise expression of the boolean condition in place of the boolean condition;
providing the arithmetic and/or bitwise expression of the computer program, wherein the arithmetic and/or bitwise expression of the computer program is configured to be executed by an arithmetic and/or bitwise operation unit of a processor; and
executing, by the arithmetic and/or bitwise operation unit, the arithmetic and/or bitwise expression of the computer program;
wherein the boolean condition takes a first variable A and a second variable B, wherein transforming the boolean condition into the arithmetic and/or bitwise expression of the boolean condition comprises:
subtracting B from A;
computing an absolute value of a result of the subtracting B from A;
computing an exponent based on the absolute value of the result of the subtracting B from A;
computing an exponential by exponentiation of a base number by the computed exponent; and
computing the arithmetic and/or bitwise expression of the boolean condition based on a remainder of a division of the exponential by the base number.

### Claim 2 (depends on 1)

The method of claim 1, wherein the arithmetic and/or bitwise expression of the boolean condition verifies the following:
if the boolean condition is verified, the arithmetic and/or bitwise expression of the boolean condition is equal to 1; and
if the boolean condition is not verified, the arithmetic and/or bitwise expression of the boolean condition is equal to 0.

### Claim 3 (depends on 2)

The method of claim 2, wherein the boolean condition comprises a consequent task that is formulated as an arithmetic statement, and wherein generating the arithmetic and/or bitwise expression of the computer program comprises:
multiplying the consequent task with the arithmetic and/or bitwise expression of the boolean condition.

### Claim 4 (depends on 3)

The method of claim 3, wherein the boolean condition comprises an alternative task that is formulated as an arithmetic statement, and wherein generating the arithmetic and/or bitwise expression of the computer program comprises:
multiplying the alternative task with a 1 minus the arithmetic and/or bitwise expression of the boolean condition.

### Claim 5 (depends on 2)

The method of claim 2, wherein the boolean condition comprises a consequent task that is formulated as a non-arithmetic statement, and wherein generating the arithmetic and/or bitwise expression of the computer program comprises:
including in the arithmetic and/or bitwise expression of the computer program an unconditional jump to a label associated with the arithmetic and/or bitwise expression of the boolean condition.

### Claim 6 (depends on 5)

The method of claim 5, wherein the label is equal to a start of a statement of the consequent task when a value of the arithmetic and/or bitwise expression of the boolean condition is equal to 1.

### Claim 7 (depends on 6)

The method of claim 6, wherein the boolean condition comprises an alternative task that is formulated as a non-arithmetic statement, wherein the label is equal to a start of a statement of the alternative task when the value of the arithmetic and/or bitwise expression of the boolean condition is equal to 0.

### Claim 8 (depends on 1)

The method of claim 1, wherein the boolean condition is A=B, and wherein transforming the boolean condition into the arithmetic and/or bitwise expression of the boolean condition comprises:
computing the exponent as the absolute value of the result of the subtracting B from A; and
computing the arithmetic and/or bitwise expression of the boolean condition as the remainder of the division of the exponential by the base number.

### Claim 9 (depends on 1)

The method of claim 1, wherein the boolean condition is A≥B, wherein transforming the boolean condition into the arithmetic and/or bitwise expression of the boolean condition comprises:
subtracting the result of the subtracting B from A from the absolute value of the result of the subtracting B from A;
computing the exponent as an absolute value of a result of the subtracting the result of the subtracting B from A from the absolute value of the result of the subtracting B from A; and
computing the arithmetic and/or bitwise expression of the boolean condition as the remainder of the division of the exponential by the base number.

### Claim 10 (depends on 1)

The method of claim 1, wherein the boolean condition is A<B, wherein transforming the boolean condition into the arithmetic and/or bitwise expression of the boolean condition comprises:
subtracting the result of the subtracting B from A from the absolute value of the result of the subtracting B from A;
computing the exponent as an absolute value of a result of the subtracting the result of the subtracting B from A from the absolute value of the result of the subtracting B from A;
computing the exponential by exponentiation of the base number by the exponent; and
computing the arithmetic and/or bitwise expression of the boolean condition as 1 minus the remainder of the division of the exponential by the base number.

### Claim 11 (depends on 1)

The method of claim 1, wherein the base number is equal to 2, wherein the processor uses a binary system, and wherein the remainder of the division of the exponential by the base number is extracted by taking a last bit of the exponential.

### Claim 12 (depends on 1)

The method of claim 1, wherein the processor uses a binary system, and wherein the exponentiation of the base number by the computed exponent is performed by shifting a bit, which is equal to 1, left by a number of places equal to the computed exponent.

### Claim 13 (depends on 1)

The method of claim 1, wherein providing the arithmetic and/or bitwise expression of the computer program comprises:
fragmenting the arithmetic and/or bitwise expression of the computer program into multiple fragments of arithmetic and/or bitwise expression; and
wherein the fragments of arithmetic and/or bitwise expression are configured to be executed in parallel.

### Claim 14

A system comprising:
one or more instruction processing units comprising at least one control unit, at least one arithmetic and/or bitwise operation unit, and at least one register unit; and
one or more memory units coupled with the one or more instruction processing units;
wherein the at least one control unit is configured to perform operations comprising:
accessing a computer program, wherein the computer program comprises a conditional statement that comprises a boolean condition;
transforming the boolean condition into an arithmetic and/or bitwise expression of the boolean condition;
generating an arithmetic and/or bitwise expression of the computer program comprising the arithmetic and/or bitwise expression of the boolean condition in place of the boolean condition; and
providing the arithmetic and/or bitwise expression of the computer program, wherein the arithmetic and/or bitwise expression of the computer program is configured to be executed by the at least one arithmetic and/or bitwise operation unit of the one or more instruction processing units, thereby causing execution, by the at least one arithmetic and/or bitwise operation unit, the arithmetic and/or bitwise expression of the computer program;
wherein the boolean condition takes a first variable A and a second variable B, wherein transforming the boolean condition into the arithmetic and/or bitwise expression of the boolean condition comprises:
subtracting B from A;
computing an absolute value of a result of the subtracting B from A;
computing an exponent based on the absolute value of the result of the subtracting B from A;
computing an exponential by exponentiation of a base number by the computed exponent; and
computing the arithmetic and/or bitwise expression of the boolean condition based on a remainder of a division of the exponential by the base number.

### Claim 15 (depends on 14)

The system of claim 14, wherein the at least one arithmetic and/or bitwise operation unit comprises one or more of an arithmetic block, a bitwise shift block, and a bitwise logical block, and wherein the at least one arithmetic and/or bitwise operation unit does not include any digital comparator.

### Claim 16 (depends on 14)

The system of claim 14, wherein the boolean condition is A=B, and wherein transforming the boolean condition into the arithmetic and/or bitwise expression of the boolean condition comprises:
computing the exponent as the absolute value of the result of the subtracting B from A; and
computing the arithmetic and/or bitwise expression of the boolean condition as the remainder of the division of the exponential by the base number.

### Claim 17 (depends on 14)

The system of claim 14, wherein the boolean condition is A≥B, wherein transforming the boolean condition into the arithmetic and/or bitwise expression of the boolean condition comprises:
subtracting the result of the subtracting B from A from the absolute value of the result of the subtracting B from A;
computing the exponent as an absolute value of a result of the subtracting the result of the subtracting B from A from the absolute value of the result of the subtracting B from A; and
computing the arithmetic and/or bitwise expression of the boolean condition as the remainder of the division of the exponential by the base number.

### Claim 18 (depends on 14)

The system of claim 14, wherein the boolean condition is A<B, wherein transforming the boolean condition into the arithmetic and/or bitwise expression of the boolean condition comprises:
subtracting the result of the subtracting B from A from the absolute value of the result of the subtracting B from A;
computing the exponent as an absolute value of a result of the subtracting the result of the subtracting B from A from the absolute value of the result of the subtracting B from A;
computing the exponential by exponentiation of the base number by the exponent; and
computing the arithmetic and/or bitwise expression of the boolean condition as 1 minus the remainder of the division of the exponential by the base number.

### Claim 19 (depends on 14)

The system of claim 14, wherein the base number is equal to 2, wherein the one or more instruction processing units use a binary system, wherein the remainder of the division of the exponential by the base number is extracted by taking a last bit of the exponential; and wherein the exponentiation of the base number by the computed exponent is performed by shifting a bit, which is equal to 1, left by a number of places equal to the computed exponent.

### Claim 20 (depends on 14)

The system of claim 14, wherein providing the arithmetic and/or bitwise expression of the computer program comprises:
fragmenting the arithmetic and/or bitwise expression of the computer program into multiple fragments of arithmetic and/or bitwise expression; and
wherein the fragments of arithmetic and/or bitwise expression are configured to be executed in parallel.
