Difference between ASR and LSR [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
What is the difference for shift right? I know ASL and LSL are the same but I don't know difference for ASR and LSR, I have tried searching but could not find a solid answer.

I can actually explain the difference between LSR and ASR:
LSR is a logical shift right. It will shift, and the top bits become 0. This is equivalent to divide an unsigned int by a power of 2.
ASR is arithmetical shift right. It will shift the number, taking into account if the number of positive or negative. It will actually shift, but top bits get the value of bit 31 (Instead of 0). This has the effect of dividing a signed integer by a power of 2.

Related

What is the function of {:-9} in python? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
In the Python tutorial (https://docs.python.org/3.8/tutorial/inputoutput.html) they used {:-9}, and i cant figure out for the life of me what the -9 does?:
yes_votes = 42_572_654
no_votes = 43_132_495
percentage = yes_votes / (yes_votes + no_votes)
'{:-9} YES votes {:2.2%}'.format(yes_votes, percentage)
Output:
42572654 YES votes 49.67%
The :-9 value indicates padding. If you remove the - the effect will be the same.
However, according to the docs, the - indicates that a sign should be used only for negative numbers (this is the default behavior).
Example:
Replacing %+f, %-f, and % f and specifying a sign:
>>> '{:+f}; {:+f}'.format(3.14, -3.14) # show it always
'+3.140000; -3.140000'
>>> '{: f}; {: f}'.format(3.14, -3.14) # show a space for positive numbers
' 3.140000; -3.140000'
>>> '{:-f}; {:-f}'.format(3.14, -3.14) # show only the minus -- same as '{:f}; {:f}'
'3.140000; -3.140000'
More on Python's Format Specification Mini-Language can be found here

Where are the actual RISC-V instruction codes? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I have downloaded the latest...
RISC-V Instruction Set Manual, Volume 1: User-Level ISA
...which is interesting but it never actually gives values for the opcodes/funct3 and other instruction formats. For example, the LOAD/STORE/BRANCH opcodes are listed by name but it does not provide the actual bit values they represent.
Where are all the codes actual listed?
They are also already conveniently encoded in the source code of the sodor project:
https://github.com/ucb-bar/riscv-sodor
for constants that capture the bit patterns in various useful ways, see:
src/common/instructions.scala
or, directly from the browser:
https://github.com/ucb-bar/riscv-sodor/blob/master/src/main/scala/common/instructions.scala
https://riscv.org/specifications/
Table 9.1 and all of Chapter 9.

Brute-force crack time for 56 bits and 64 bits (DES) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I've been looking online for a simple way to calculate the average time it would take a computer to crack a 56 bit and 64-bit key using a brute-force but I can't find any simple explanation for it or a formula to calculate it.
Is there a way I can calculate how long it would take to brute-force 56-bits and how would I calculate how much the time would increase by if i increase the key by 1 bit?
It strongly depends on an algorithm implementation (raw or heavily optimized) and hardware which this implementation will be run on (CPU (multicore?), GPU or FPGA, ASIC).
However, you can check some benchmarks of oclhashcat (GPU) and john the ripper (CPU), and then divide keyspace size 2^56 or 2^64 by number of combinations these crackers do per second. Then you can easily convert it to minutes, hours and so on...

If C6/2 is less than .5, then E6 will be .5 otherwise the answer is C6/2 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I would like to have a formula to answer the following:
If C6/2 is less than .5, then E6 will be .5 otherwise the answer is C6/2.
I would go with the equivalent (but smaller) statement =IF(C6<1,.5,C6/2)
What you're doing has another name it's called the max function. =MAX(C6/2,.5) will produce the same result but is much easier to read.
How about =IF(C6/2<.5,.5,C6/2)? Place in E6.

Find sequences that does not match to a target sequence [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
An interesting question by Rnaer from Biostar:
I want to find unique dna/protein sequences of a given length (30nt, for example)
that does not match to any region of the C.elegans genome. Is there
any tool to do that?
NCBI provides an easy way to search DNA/Amino acid sequence databases that DO NOT match to a target organisms genome, yet match to other databases and sources.
Just use the exclude field in NCBI's BLASTn
Hope this was useful.

Resources