The Daily CLAD

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Rotate Left with Carry

SercoSteveB
Active Participant

What are Numeric Value Out 1 and Numeric Value Out 2 following execution of the VI.

Rotate with Carry.png

a) Numeric Value Out 1 = 0x468ACF12, Numeric Value Out 2 = 0x468ACF02

b) Numeric Value Out 1 = 0x2468ACF0, Numeric Value Out 2 = 0x2468ACF1

c) Numeric Value Out 1 = 0x0ECA8643, Numeric Value Out 2 = 0x0ECA8642

d) Numeric Value Out 1 = 0x2468ACF1, Numeric Value Out 2 = 0x2468ACF0

Comments
LordNobady
Member

D i think


Learning LabVIEW since January 2013
nmpundlik
Member

Answer is D.

RAMESHB
Member

I got the Answer D like this what is the problem here can any one tell me

                         Numaric value out 1 is 0x2468ACF0

                         Numaric value out 2 is 0x2468ACF1

                          answers is interchange

SercoSteveB
Active Participant

Question modified. Any better?

JGmitter
Member

Answer is D.

crossrulz
Knight of NI

D

Another one of my favorite functions that people don't seem to know about.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
MrStevenUND
Member

D.

2verb
Member

D.

Another one I used all the time when I wrote assembly, but not so much in any higher level language.

Asha_Nagaraj
Member

D.

SercoSteveB
Active Participant
mini09
Active Participant

agreed D as well....

Kapur
Member

Question- do the bits get rotated left? Like shown here

https://www.youtube.com/watch?v=vw3mJFZICkI

crossrulz
Knight of NI

Except for the fact that you get to specify what the carry input is.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Kapur
Member

Thank you for your answer. x12345678 is 10010001101000101011001111000. If I rotate each bit one bit to the left (from LSB to MSB), I should get 00100011010001010110011110001. The MSB was 1, it is now 0. Did I understand correctly?

A.Bernau
Member

http://en.wikipedia.org/wiki/Logical_shift

http://zone.ni.com/reference/en-XX/help/371361L-01/glang/rotate_left_with_carry/

D

I still prefer the term shift instead of rotate, rotate is misleading.

But LabVIEW help is quite clear (see link)

Akhil_shah
Member

Please can any one explain it in detail that how these 0x2468ACF1 and 0x2468ACF0 answer came.

crossrulz
Knight of NI

Akhil_shah,

Look at the values in a binary format and it will become a lot more obvious (do make sure you are seeing all 32 bits).  We are just shifting all of the bits to the left by one location and then specifying what value goes in the LSb (Least Significant Bit).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
skian
Member

D