Circuit and method for binary sign determination

By designing a circuit in the processor to directly determine the symbol indicator bits and carry numbers, the problem that the processor in the prior art needs to demask operations for processing masked data, and improves processing efficiency and accuracy.

CN112650469BActive Publication Date: 2024-12-06STMICROELECTRONICS (GRENOBLE 2) SAS +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011076523.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-10-11
Filing Date
2020-10-10
Publication Date
2024-12-06
Estimated Expiration
2040-10-10

AI Technical Summary

Technical Problem

Existing processors need demask operations when processing masked data, and it is difficult to determine the symbol indicator bits, affecting processing efficiency and accuracy.

Method used

By designing a circuit in the processor, the symbol indicator bits and carry numbers are directly determined using mask operations, avoiding demask operations, and the calculation of symbol indicator bits and carry numbers is realized through specific algorithms and circuit structures.

Benefits of technology

It realizes determining symbol indicator bits and carry numbers without demapping, improves the processing efficiency and accuracy of the processor, and meets the needs of processing masked data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112650469B_ABST
    Figure CN112650469B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to circuits and methods for binary sign determination. The present disclosure relates to a circuit and method for determining a sign indicator bit of binary data, the circuit and method including steps for processing binary data masked using a mask operation and not including any processing steps of the binary data.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims the benefit of French Application No. 1911345, filed on October 11, 2019, which is incorporated herein by reference. Technical Field

[0003] The present disclosure relates generally to electronic systems, circuits and methods, and more particularly to processors and methods. The present disclosure relates more particularly to methods and processors configured to process masked data. Background Art

[0004] The present disclosure relates generally to electronic systems, circuits and methods, and more particularly to processors and methods. The present disclosure relates more particularly to methods and processors configured to process masked data. Summary of the invention

[0005] There is a need in the art for more reliable processors.

[0006] There is a need in the art for a processor configured to process masked data.

[0007] There is a need in the art for a processor that is configured to process masked data without requiring demasking operations to be performed on the data.

[0008] One embodiment addresses all or some of the disadvantages of known processors.

[0009] One embodiment provides a method for determining a sign indicator bit of binary data, the method comprising steps for processing the binary data masked using a mask operation, and the method does not include any processing steps of the binary data.

[0010] According to one embodiment, the data is not unmasked during the determination.

[0011] According to one embodiment, if the most significant bit of the data is equal to "1", the data is negative.

[0012] According to one embodiment, the data to be masked is masked by adding a mask to the data to be masked.

[0013] According to one embodiment, the sign indicator bit is equal to "1" when the following conditions are met:

[0014] (H_M+CH_M*2 n )≥(MH+2 n-1 )

[0015] in:

[0016] H_M is the masked data;

[0017] “+” indicates addition;

[0018] CH_M is a carry digit that may occur during the masking operation of the masked data H_M;

[0019] MH is the mask; and

[0020] n is the number of bits in the masked data and the mask.

[0021] According to one embodiment, the carry digit is equal to "1" when the following conditions are met:

[0022] H_M<MH

[0023] Otherwise, the carry digit is equal to "0".

[0024] Another embodiment provides a circuit configured to perform the above method.

[0025] According to one embodiment, the circuit comprises a comparator. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The foregoing features and advantages, as well as other features and advantages, will be described in detail in the following description of specific embodiments given by way of example and not limitation, with reference to the accompanying drawings, in which:

[0027] Figure 1 A portion of the architecture of a processor is shown schematically and in block diagram form;

[0028] Figure 2 Schematically and in block diagram form, Figure 1 An embodiment of a circuit of a processor;

[0029] Figure 3 Schematically and in block diagram form, Figure 1 Another circuit embodiment of a processor of; and

[0030] Figure 4 Schematically and in block diagram form, Figure 1 Detailed examples of embodiments of the processor. DETAILED DESCRIPTION

[0031] In the various drawings, similar features have been denoted by similar reference numerals. In particular, common structural and / or functional features between the various embodiments may have the same reference numerals and may be provided with the same structures, dimensions, and material properties.

[0032] For clarity, only operations and elements useful for understanding the embodiments described herein are shown and described in detail. The complete operation of the processor will not be disclosed here, and the embodiments disclosed below are compatible with most typical operation methods of the processor.

[0033] Unless otherwise specified, when referring to two elements being connected together, this means a direct connection without any intermediate elements except conductors, and when referring to two elements being coupled together, this means the two elements may be connected or they may be coupled via one or more other elements.

[0034] In the following disclosure, unless otherwise stated, when referring to absolute position qualifiers (such as terms "front", "back", "top", "bottom", "left", "right", etc.) or relative position qualifiers (such as terms "above", "below", "higher", "lower", etc.) or orientation qualifiers (such as "horizontal", "vertical", etc.), reference is made to the orientation shown in the figure.

[0035] Unless otherwise stated, the expressions "about", "approximately", "substantially" and "on the order of" mean within 10%, and preferably within 5%.

[0036] In the remainder of the present disclosure, data are binary data, that is, each data corresponds to a binary word comprising at least one bit (preferably more than one bit).

[0037] Figure 1 A portion of the architecture of one embodiment of a processor 10 (CPU) is shown schematically and in block diagram form.

[0038] The processor 10 is a processor configured to process masked data and its mask. The processor 10 includes an arithmetic and logic unit 100 (ALU), which is also configured to process masked data and its mask. More specifically, the processor 100 receives masked input data Data_In and its mask Mask_In as input, and supplies masked output data Data_Out and its mask Mask_Out as output.

[0039] By implementing an arithmetic type of mask, the input data Data_In or the output data Data_Out are respectively masked using the mask Mask_In or Mask_Out. In the case described here, the arithmetic mask is an additive mask, in which the mask is added to the data to be masked. The mask and the data to be masked are binary words of equal size. More specifically, the masked data A_M is given by the following formula:

[0040] A_M=(A+MA)mod2 n

[0041] in:

[0042] A represents the data to be masked;

[0043] MA means mask;

[0044] “+” indicates addition;

[0045] "mod" means modulo operation; and

[0046] n is the number of bits constituting the data A to be masked, the mask MA and the masked data A_M.

[0047] The unit 100 is also configured to receive an operation code Opcode, which explains the processing to be applied to the pair each comprising the masked input data Data_In and its mask Mask_In. The operation code Opcode indicates different operations or different sets of operations to be applied to the masked input data Data_In and its mask Mask_In in order to obtain the masked output data Data_Out and its mask Mask_Out. More specifically, the operation code is an instruction set that defines an arithmetic and / or logic operation or a set of arithmetic and / or logic operations to be applied to the input data Data_In and its mask Mask_In.

[0048] To implement these opcodes, the unit 100 includes one or several (preferably several) circuits 101 (OP) configured to perform various arithmetic or logical operations. The circuits 101 are configured to be selected and used according to the instruction set defined by the opcode Opcode received by the unit 100. As an example, the circuits 101 are configured to perform arithmetic operations such as addition, multiplication, complementary calculations, and / or logical operations such as AND operations, OR operations, and exclusive OR (XOR) operations. Several circuits 101 can be implemented in parallel or in series to execute the opcode Opcode. Therefore, each circuit 101 is configured to receive the masked input data Data_In and its mask Mask_In and / or the intermediate masked output data Data_Int and its mask Mask_Int (which corresponds to the output data and its mask) of other circuits 101.

[0049] The unit 100 further comprises a circuit 103 (FL) for generating an indicator bit or a flag bit. Each circuit 103 is coupled to one of the circuits 101. The circuit 103 is configured to receive as input the masked data and its mask received as input by the circuit 101 and the data and its mask supplied as output by the circuit 101. Thus, in relation to Figure 1In the disclosed example, the circuit 103 is configured to receive the masked data Data_In and its mask Mask_In (not shown in FIG. Figure 1 ) as well as the intermediate output data Data_Int and its mask Mask_Int.

[0050] Circuit 103 supplies an indicator bit as an output. More specifically, circuit 103 is configured to supply:

[0051] Sign indicator bit Flag_N;

[0052] Carry digit indicator bit Flag_C;

[0053] a zero value indicator bit Flag_Z; and

[0054] Overflow indicator bit Flag_V.

[0055] According to a variant, certain parts of the circuit 103 of the unit 100 may be shared by several circuits 101 .

[0056] When the data of the sign indicator bit Flag_N is calculated to be a negative number, the sign indicator bit Flag_N is a bit equal to "1", otherwise it is equal to "0". Figure 2 An exemplary circuit is disclosed that is configured to calculate an indicator bit Flag_N.

[0057] When the data of the calculated carry digit indicator Flag_C includes a carry digit, the carry digit indicator Flag_C is a bit equal to "1", otherwise it is equal to "0". Figure 3 An exemplary circuit is disclosed that is configured to calculate an indicator bit Flag_N.

[0058] When the data of the zero value indicator bit Flag_Z is calculated to be equal to zero, the zero value indicator bit Flag_Z is a bit equal to "1", otherwise it is equal to "0".

[0059] The overflow indicator bit Flag_V is a bit equal to "1" when the data from which the overflow indicator bit Flag_V is calculated represents a number that is too large to be represented by the number of data bits from which it is calculated, and is equal to "0" otherwise.

[0060] According to one embodiment, the indicator bits Flag_N, Flag_C, Flag_Z and Flag_V are generated each time the circuit 101 is used. According to a variant, only some of the indicator bits Flag_N, Flag_C, Flag_Z and Flag_V are generated for multiple uses of the circuit 101 or for another type of circuit 101.

[0061] Figure 2An embodiment of a circuit 20 (Flag_N) is shown schematically and in block diagram form, the circuit 20 being configured to calculate a value relative to Figure 1 The public sign indicator bit Flag_N.

[0062] The circuit 20 receives as input the masked data B_M and its mask MB, the data B_M being obtained from the data B. The data B_M and the mask MB are binary words comprising n bits, n being a natural integer. The following representation will be used hereinafter:

[0063] P[m;k] specifies the set of bits from level k to level m of the binary word P, m and k being natural integers less than or equal to n; and

[0064] P[m] specifies the bit of rank m of the binary word P.

[0065] As compared to Figure 1 As disclosed, when the data of the calculated sign indicator bit Flag_N (that is, data B here) represents a negative number, the sign indicator bit Flag_N is a bit equal to "1", otherwise it is equal to "0". By convention, the most significant bit of a binary word representing a negative number is equal to "1". According to one embodiment, the masked data B_M is negative when the following conditions are met:

[0066] (B_M[n-1;0]+CB_M*2 n )≥(MB[n-1;0]+2 n-1 )

[0067] Here, CB_M represents a carry digit that may occur during a masking operation resulting in masked data B_M.

[0068] The carry digit CB_M is equal to "1" when the following conditions are met, otherwise the carry digit CB_M is equal to "0":

[0069] B_M[n-1;0]<MB[n-1;0]

[0070] Relative to Figure 2 One advantage of the disclosed circuit is that it enables the provision of a sign indicator bit Flag_N of masked data without having to demask the masked data.

[0071] Figure 3 An embodiment of a circuit 30 (Flag_C) is shown schematically and in block diagram form, which is configured to calculate a value relative to Figure 1 Public carry digit indicator bit Flag_C.

[0072] The circuit 30 is more specifically related to Figure 1The circuit 103 disclosed is associated with the circuit 101 for performing an addition operation between two masked data. More specifically, the output data D_M of the circuit 101 and its mask MD are given by the following formula:

[0073]

[0074] in:

[0075] D1_M and D2_M represent two data D1 and D1 after the mask operation; and

[0076] MD1 and MD2 represent masks of the masked data D1_M and D2_M.

[0077] As compared to Figure 1 It is disclosed that when the data of the calculated carry digit indicator bit Flag_C includes a carry digit, the carry digit indicator bit Flag_C is a bit equal to "1", otherwise it is equal to "0". The carry digit indicator bit Flag_C is more specifically given by the following equivalent formula:

[0078] Flag_C=CD1_M xor CD2_M xor CADD_D_M xor CADD_MD xor CD_MD

[0079] Flag_C=CD1_M+CD2_M+CADD_D_M-CADD_MD-CD_M

[0080] in:

[0081] xor represents the exclusive OR logic operation;

[0082] CD1_M represents a carry digit that may occur during an addition mask operation resulting in the masked data D1_M having the mask MD1;

[0083] CD2_M represents a carry digit that may occur during an addition mask operation resulting in the masked data D2_M having the mask MD2;

[0084] CADD_D_M represents a carry digit that may occur during the addition operation between two masked data D1_M and D2_M;

[0085] CADD_MD represents the carry digit that can occur during the addition operation between the two masks MD1 and MD2;

[0086] CD_M represents a carry digit that may occur during an addition mask operation resulting in masked data D_M having mask MD;

[0087] The carry digits CD1_M, CD2_M and CD_M are obtained by comparing their respective associated masked data with their mask in the same manner as for Figure 2 The public method of obtaining the carry digit CB_M is the same.

[0088] The carry digit CADD_D_M is equal to "1" when the following conditions are met:

[0089] D_M[n-1;0]<(D1_M[n-1;0]+D2_M[n-1;0])mod2 n

[0090] Otherwise, the carry digit CADD_D_M is equal to "0". The carry digit CADD_D_M is also the bit of level n obtained by adding the binary words D1_M[n-1;0] and D2_M[n-1;0].

[0091] The carry digit CADD_MD is equal to "1" when the following conditions are met:

[0092] MD[n-1;0]<(MD1[n-1;0]+MD2[n-1;0])mod2 n

[0093] Otherwise, the carry digit CADD_MD is equal to "0". The carry digit CADD_MD is also the bit of level n obtained by adding the binary words MD1[n-1;0] and MD2[n-1;0].

[0094] Relative to Figure 3 One advantage of the disclosed circuit 30 is that it does not use any demasking operation of the masked data D_M, D1_M and D2_M to calculate the carry digit indicator bit Flag_C.

[0095] Figure 4 A more detailed example of an embodiment of circuit 103 associated with circuit 101 is shown schematically and in block diagram form.

[0096] Circuit 101 is a circuit configured to perform addition or subtraction operations between two masked data E_M and F_M and their masks ME and MF to provide masked data G_M and its mask MG as output. The masked data E_M, F_M, G_M are the results of adding and masking the data E, F, G respectively using masks ME, MF, MG. In the case of addition, the masked data G_M and its mask MG are given by the following formula (A):

[0097]

[0098] In the case of subtraction, the masked data G_M and its mask MG are given by the following formula (B):

[0099]

[0100] where !X specifies the 1's complement of the binary word X.

[0101] The circuit 101 includes two adder circuits 1011 and 1012 and two inverter circuits 1013 and 1014. As an example, the inverter circuits 1013 and 1014 are exclusive OR logic circuits used as inverters in the case of a subtraction operation or as followers in the case of an addition operation.

[0102] The bitwise addition circuit 1011 is a circuit comprising at least three inputs and at least two outputs. The circuit 1011 receives as inputs the mask ME, the mask MF' from the modified mask M, and the operation information ADD_SUB. As an example, the operation information ADD_SUB is equal to "0" in the case of addition and equal to "1" in the case of subtraction. The circuit 1011 provides the mask MG and the carry number C1011 as outputs.

[0103] The adding circuit 1012 is a circuit including at least three inputs and at least two outputs. The circuit 1012 receives as inputs the masked data E_M, the masked data F_M' from the modified masked data F_M, and the operation information ADD_SUB. The circuit 1012 provides as outputs the mask MG and the carry number C1012.

[0104] The inverter circuit 1013 enables the mask MF to be modified into the mask MF′ according to the operation information ADD_SUB.

[0105] The inverter circuit 1014 enables the masked data F_M to be modified into the masked data F_M′ according to the operation information ADD_SUB.

[0106] The operation of the circuit 101 is as follows: When an addition operation is requested, the operation information ADD_SUB is equal to "0", and when a subtraction operation is requested, the operation information ADD_SUB is equal to "1".

[0107] When an addition operation is requested, the inverter circuits 1013 and 1014 see the operation information ADD_SUB equal to "0", which indicates to the inverter circuits 1013 and 1014 that the data received as input is not required to be inverted. Then, the circuits 1013 and 1014 supply the mask MF' equal to the mask MF and the masked data F_M' equal to the masked data F_M as output. The adder circuits 1011 and 1012 take the data received by them as input and then provide the mask MG and the masked data G_M as output according to the formula (A) given above.

[0108] When a subtraction operation is requested, the inverter circuits 1013 and 1014 see the operation information ADD_SUB equal to "0", which indicates to the inverter circuits 1013 and 1014 that a request is made to calculate the complement of the data received as input. Then, the circuits 1013 and 1014 supply as outputs the mask MF' equal to the mask MF and the masked data F_M' equal to the masked data F_M. The adder circuits 1011 and 1012 take as input the data received by them and then provide as outputs the mask MG and the masked data G_M according to the formula (B) given above.

[0109] Circuit 103 is suitable for supplying relative Figure 1 The disclosed indicator bits Flag_V, Flag_C, Flag_N and Flag_Z. The circuit 103 receives as input:

[0110] Mask ME;

[0111] Masked data E_M;

[0112] Mask MF;

[0113] Masked data F_M;

[0114] Operation information ADD_SUB;

[0115] Carry number C1011 from adder circuit 1011;

[0116] Carry number C1012 from adder circuit 1012;

[0117] mask MG; and

[0118] Masked data G_M.

[0119] The circuit 103 comprises:

[0120] three comparator circuits 1031 (COMP1), 1032 (COMP2) and 1033 (COMP3);

[0121] Two circuits 1034 and 1035 implementing AND type logic gates;

[0122] A circuit 1036 implementing an OR-type logic gate; and

[0123] A circuit 1037 implementing an EXCLUSIVE OR type logic gate.

[0124] The comparator circuit 1031 receives the mask ME and the masked data E_M as inputs, and supplies a binary word CE_M as output, which represents a carry digit that may occur during the masking operation resulting in the masked data E_M. In addition, the comparator circuit 1031 supplies a sign indicator bit FlagE_N as output, which indicates the sign of the data E corresponding to the masked data E_M demasked using the mask ME.

[0125] The comparator circuit 1032 receives the mask MF, the masked data F_M and the operation information ADD_SUB as inputs, and supplies a binary word CF_M as output, which in the case of addition represents a carryover number that may occur during the masking operation resulting in the masked data F_M, and in the case of subtraction represents the reciprocal of the carryover number that may occur during the masking operation resulting in the masked data F_M. In addition, the comparator circuit 1032 supplies a sign indicator bit FlagF_N as output, which in the case of addition indicates the sign of the data F corresponding to the masked data F_M demasked using the mask MF, or in the case of subtraction indicates the reciprocal of the sign of F.

[0126] The comparator circuit 1033 receives the mask MG and the masked data G_M as inputs, and supplies a binary word CG_M as output, which represents a carry digit that may occur during the masking operation resulting in the masked data G_M. In addition, the comparator circuit 1033 supplies a sign indicator bit FlagG_N and a zero value indicator bit FlagG_Z as outputs, wherein the sign indicator bit FlagG_N indicates the sign of the data G corresponding to the masked data G_M demasked by [sic] using the mask MG, and the zero value indicator bit FlagG_Z indicates whether the data G is equal to zero. The sign indicator bit Flag_N is equal to the indicator bit FlagG_N. The zero value indicator bit Flag_Z is equal to the indicator bit FlagG_Z.

[0127] Circuit 1034 is a circuit implementing an AND-type logic gate, including one non-inverter input and two inverter inputs. Circuit 1034 receives a sign indicator bit FlagG_N on its non-inverter input, and circuit 1034 receives a sign indicator bit FlagE_N and a sign indicator bit FlagG_N as inputs on its two inverter inputs. Circuit 1034 provides data Flag_V4 as output.

[0128] Circuit 1035 is a circuit implementing an AND-type logic gate, including two non-inverter inputs and one inverter input. Circuit 1034 receives the sign indicator bit FlagE_N and the sign indicator bit FlagF_N on its non-inverter input, and receives the sign indicator bit FlagG_N on its inverter input as input. Circuit 1035 provides data Flag_V5 as output.

[0129] Circuit 1036 is a circuit implementing an OR logic gate, including two inputs. Circuit 1036 receives the outputs of circuits 1035 and 1036 as inputs (ie, data Flag_V4 and FlagV5). Circuit 1036 provides an overflow indicator bit Flag_V as an output.

[0130] Circuit 1037 is a circuit implementing an XOR logic gate, including five non-inverter inputs. Circuit 1037 receives carry digit CE_M, carry digit CG_M, carry digit C1011 and carry digit C1012 as inputs. Circuit 1037 provides a carry digit indicator bit Flag_C as output.

[0131] Relative to Figure 4 One advantage of the disclosed circuit 103 is that it does not use a demasking operation to calculate the indicator bits Flag_V, Flag_C, Flag_N, and Flag_Z.

[0132] Various embodiments and variations have been described. Those skilled in the art will appreciate that certain features of these embodiments may be combined, and those skilled in the art will readily conceive of other variations.

[0133] Finally, actual implementation of the embodiments and variations described herein is within the capabilities of those skilled in the art based on the functional description provided above.

Claims

1. A method for binary flag determination, comprising: receiving, by an addition / subtraction circuit in an arithmetic and logic unit (ALU) circuit, first mask binary data, a first mask for the first mask binary data, second mask binary data, a second mask for the second mask binary data, and addition / subtraction operation information; adding the second masked binary data to the first masked binary data or subtracting the second masked binary data from the first masked binary data according to the addition / subtraction operation information by the addition / subtraction circuit in the ALU circuit to generate output masked binary data; as well as adding the second mask to the first mask or subtracting the second mask from the first mask according to the addition / subtraction operation information by the addition / subtraction circuit in the ALU circuit to generate an output mask; as well as Determining a sign indicator bit of the output demasked binary data of the output masked binary data by a comparator circuit in the ALU circuit, the determining comprising: processing the output masked binary data and the output mask by the comparator circuit in the ALU circuit without performing any processing on the output unmasked binary data itself; wherein the output masked binary data is masked by adding the output mask to the output demasked binary data; and Wherein, the sign indicator bit is equal to "1" according to the following conditions being met: (H_M+CH_M*2 n )≥(MH+2 n-1 )in: H_M is the output mask binary data; "+" indicates addition operation; CH_M is a carry digit that may occur during the masking operation of the output mask binary data H_M; MH is the output mask; and n is the number of bits in the output mask binary data and the output mask.

2. The method according to claim 1, wherein: The output mask binary data remains masked during the determining.

3. The method according to claim 1, wherein: According to the most significant bit of the output demasked binary data being equal to "1", the output demasked binary data is negative.

4. The method according to claim 1, wherein: The carry digit is equal to "1" if the following conditions are met: H_M<MH.

5. The method according to claim 1, wherein: The carry digit is equal to "0" if the following conditions are not met: H_M<MH.

6. A circuit for binary sign determination, comprising: Addition / subtraction circuit, configured as: receiving first masked binary data, a first mask for the first masked binary data, second masked binary data, a second mask for the second masked binary data, and addition / subtraction operation information; adding the second mask binary data to the first mask binary data or subtracting the second mask binary data from the first mask binary data according to the addition / subtraction operation information to generate output mask binary data; as well as adding the second mask to the first mask or subtracting the second mask from the first mask according to the addition / subtraction operation information to generate an output mask; as well as a comparator circuit configured to determine a sign indicator bit of the output demasked binary data of the output masked binary data, the determining comprising the comparator circuit being configured to: processing the output masked binary data and the output mask without performing any processing on the output unmasked binary data itself; wherein the output masked binary data is masked by adding the output mask to the output unmasked binary data; Wherein, the sign indicator bit is equal to "1" according to the following conditions being met: (H_M+CH_M*2 n )≥(MH+2 n-1 )in: H_M is the output mask binary data; "+" indicates addition operation; CH_M is a carry digit that may occur during the mask operation of the output mask binary data H_M; MH is the output mask; and n is the number of bits in the output mask binary data and the output mask.

7. The circuit according to claim 6, wherein: The output mask binary data remains masked during the determining.

8. The circuit according to claim 6, wherein: According to the most significant bit of the output demasked binary data being equal to "1", the output demasked binary data is negative.

9. The circuit according to claim 6, wherein: The carry digit is equal to "1" if the following conditions are met: H_M<MH.

10. The circuit according to claim 6, wherein: The carry digit is equal to "0" if the following conditions are not met: H_M<MH.

11. A processor, comprising: Arithmetic and logic unit ALU circuit, configured to include: Addition / subtraction circuit, configured as: receiving first masked binary data, a first mask for the first masked binary data, second masked binary data, a second mask for the second masked binary data, and addition / subtraction operation information; adding or subtracting the second masked binary data from the first masked binary data according to the addition / subtraction operation information to generate output masked binary data and an output masked binary data carry digit; and adding the second mask to the first mask or subtracting the second mask from the first mask according to the addition / subtraction operation information to generate an output mask and an output mask carry digit; and a first comparator circuit, the first comparator circuit being configured to determine a sign indicator bit of the output demasked binary data of the output masked binary data, the determining comprising the first comparator circuit being configured to: processing the output masked binary data and the output mask without performing any processing on the output unmasked binary data itself; and a second comparator circuit and a third comparator circuit, wherein the first comparator circuit, the second comparator circuit, and the third comparator circuit are configured to process the first mask binary data, the first mask for the first mask binary data, the second mask binary data, the second mask for the second mask binary data, the addition / subtraction operation information, the output mask binary data, the output mask, the output mask binary data carry digit, and the output mask carry digit to generate a carry digit indicator bit, a zero value indicator bit, and an overflow indicator bit; wherein the output masked binary data is masked by adding the output mask to the output demasked binary data; and Wherein, the sign indicator bit is equal to "1" according to the following conditions being met: (H_M+CH_M*2 n )≥(MH+2 n-1 ) in: H_M is the output mask binary data; "+" indicates addition operation; CH_M is the first carry digit that may appear during the masking operation of the output mask binary data H_M; MH is the output mask; and n is the number of bits in the output mask binary data and the output mask.

12. The processor of claim 11, wherein: The output mask binary data remains masked during the determining.

13. The processor of claim 11, wherein: According to the most significant bit of the output demasked binary data being equal to "1", the output demasked binary data is negative.

14. The processor of claim 11, wherein: The first carry digit is equal to "1" if the following conditions are met: H_M<MH.

15. The processor of claim 11, wherein: The first carry digit is equal to "0" if the following conditions are not met: H_M<MH.