Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
新注册的用户请输入邮箱并保存,随后登录邮箱激活账号。后续可直接使用邮箱登录!
Open sidebar
zkp
zkevm-circuits
Wiki
Code notes
simple_lt
simple_lt
· Changes
Page history
restyle docs
authored
Aug 07, 2024
by
gzxu
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
98 additions
and
98 deletions
+98
-98
code-notes/simple_lt.markdown
code-notes/simple_lt.markdown
+98
-98
No files found.
code-notes/simple_lt.markdown
View page @
4303f57c
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
过程推导与讲解(假设lhs为16bit操作数):
过程推导与讲解(假设lhs为16bit操作数):
-
该公式由减法公式推导而来,减法公式中有
`a-b=c-carry<<16`
,假设a,b为16bit操作数,在sub公式中,我们已有结论carry = 1时,a
<b
,
carry =
0时,a
>
=b。
-
该公式由减法公式推导而来,减法公式中有
`a-b=c-carry<<16`
,假设a,b为16bit操作数,在sub公式中,我们已有结论carry = 1时,a
<b
,
carry =
0时,a
>
=b。
-
将rhs设为2^15,range设为2^16,根据减法公式,则有lt=1时,lhs<rhs,那么代表lhs最高位不为1,该数应为正数,反之则有负数。
-
将rhs设为
`
2^15
`
,range设为
`
2^16
`
,根据减法公式,则有lt=1时,lhs<rhs,那么代表lhs最高位不为1,该数应为正数,反之则有负数。
### 与lt电路区别
### 与lt电路区别
...
...