Processor Blank Bit for NULL String Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional processor architectures require excessive processing resources and instructions to compare strings, particularly due to the need to repeatedly check for NULL termination characters, which increases processing time for long strings.
Innovation Solution
A novel processor architecture introduces a 'blank bit' in the flag register, which, when used with specific instructions, reduces the number of instructions needed to check for NULL values, allowing for efficient execution of string comparison and other string functions by conditional operations based on the blank bit's state.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If conventional processor architectures use standard instruction sets to compare strings, then the comparison can be performed using existing instructions, but the number of clock cycles required increases significantly due to repeated NULL character checks
Solution Approach 1:
The processor performs preliminary action by checking for NULL characters during the load operation itself rather than requiring separate comparison instructions. The load instruction automatically sets the blank bit when it loads a NULL character (0x00) from memory, eliminating the need for subsequent separate NULL checks and reducing the total number of instructions executed during string comparison.
Solution Approach 2:
The invention merges the NULL character detection function into the existing load instruction by adding a new flag (blank bit) to the processor status register. This combines what were previously separate operations (loading data and checking for NULL) into a single unified instruction execution, reducing instruction overhead and improving string comparison efficiency.
2Reliability
If the processor checks each character for NULL termination in every iteration, then accurate string comparison is achieved, but the processing overhead increases for long strings
Solution Approach 1:
The load instruction serves itself by automatically detecting NULL characters during its normal operation and setting the blank bit accordingly. This self-service mechanism eliminates the need for separate comparison instructions to check for NULL termination, as the load instruction inherently performs both data loading and NULL detection functions.
Solution Approach 2:
The invention changes the parameter space of the load instruction by adding a new status flag (blank bit) to the processor status register. This parameter change enables the instruction to convey additional information (NULL character presence) without requiring additional instructions, thereby maintaining accuracy while reducing complexity.
3Ease of manufacture
If standard assembly instructions are used to load and compare string characters, then the implementation is straightforward, but the number of instructions required increases the execution time
Solution Approach 1:
The load instruction becomes universal by performing multiple functions: it loads data from memory into a register, increments the pointer, and simultaneously detects NULL characters by setting the blank bit. This multi-functionality reduces the total number of instructions needed for string comparison while maintaining implementation simplicity, as the same load instruction handles both data transfer and termination detection.
Solution Approach 2:
The NULL character detection function is extracted from the comparison logic and integrated into the load instruction's inherent operation. By taking out the separate NULL check requirement and embedding it within the load operation itself, the implementation remains simple while execution time is reduced.
Data Source
AI summary
Reading a value into a register, checking to see if the value is a NULL, and then jumping out of a loop if the value is a NULL is a common task that processors perform. To speed performance of such a task, a novel “blank bit” is added to the flag register of a processor. When a first instruction (arithmetic, logic or load) is executed, the instruction operands are checked to see if any is a NULL character value. Information on the result of the check is stored in the blank bit. Execution of a second instruction uses the information stored in the blank bit to determine whether or not a second operation (for example, a jump) will be performed. By using the first and second instructions in a loop, the number of instructions executed to check for NULLs at the end of strings and arrays is reduced.


