IP Library Granted Patent US 11,029,920
Granted Patent B1
US 11,029,920 · App. 17/076,726 · Granted Jun 8, 2021

Execution of a conditional statement by an arithmetic and/or bitwise unit

Inventor: Timur Ryspekov (Almaty, KZ)
Assignee: Chariot Technologies Lab, Inc.
G06F7/57G06F8/443G06F8/4441G06F9/30072
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,029,920
App. No.
17/076,726
Granted
Jun 8, 2021
Kind
B1
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 (71)

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.

2. 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.

3. 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.

4. 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.

5. 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.

6. 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.

7. 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.

8. 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.

9. 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.

10. 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.

11. 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.

12. 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.

13. 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.

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.

15. 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.

16. 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.

17. 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.

18. 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.

19. 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.

20. 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.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 3, 2020
From: RYSPEKOV, TIMUR
To: CHARIOT TECHNOLOGIES LAB, INC.
Reel/Frame 054298/0057 →
Cited By (1)
US 12,517,712