The Daily CLAD

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

Re: Numeric Array Functions

SercoSteveB
Active Participant

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

Numeric Array Functions.png

a) Numeric Value Out 1=1, Numeric Value Out 2=6

b) Numeric Value Out 1=21, Numeric Value Out 2=208

c) Numeric Value Out 1=21, Numeric Value Out 2=720

d) Numeric Value Out 1=720, Numeric Value Out 2=720

Comments
Musale
Member

numeric out1=21

numeric out2=720

SercoSteveB
Active Participant

Nice one Musale.  Question amended,

nmpundlik
Member

Answer is C.

crossrulz
Knight of NI

C

You don't really need to find the actual results to figure this one out.  You can do some estimates that will weed out the obvious wrong answers.


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

C.

JGmitter
Member

C.  Estimation is key. 

LordNobady
Member

C


Learning LabVIEW since January 2013
jagadishj
Member

The answer is C.

RAMESHB
Member

Answer is C.

SercoSteveB
Active Participant

Answer: C. B.  Nice one Musale, nmpundlik, crossrulz, MrStevenUND, J-MACK, LordNobady, jagadishj & RAMESHB

Yep; it is good to slide in some exam technique into the questions identifying the simpler LabVIEW concepts.  No need to complete the operations in this one, estimate (thanks crossrulz & J-MACK) and save yourself some valuable time in the exam.

See below.

mini09
Active Participant

when i run with I32 data type the answer is C. if i run with the U8 the answer is B so according to the given question B should be the answer.

SercoSteveB
Active Participant

Well at least one of us is paying attention.  Nice one gnshmrthy kudos to you.

Answer: B.  Nice one gnshmrthy.

Slightly embarrassing for me as I can now remember adding this little gotcha...and managed to get myself.

mini09
Active Participant

Thanks Steve.

Joseph.Vitale
Member

C. Thank you so much for supplying all of these qestions.

aqz
Member
Member

hi can anybody tell me how 208 came?

crossrulz
Knight of NI

The data type is a U8.  Therefore, once the value goes above 255 (0xFF), it must roll over (256 => 0).  The easiest way to do this is to just drop any of the extra bits (just keep the lower 8 bits).  When you do this, 720 (0x2D0) becomes 208 (0xD0).


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
aqz
Member
Member

ok got it.....we need to start counting with hex values, what i did was to convert the decimals like 255 + 255 giving closest value to 720, which is 210 i guess...thanks

ashwinilele
Member

B. Because of U8

Otherwise

Ans C

s.vishal91
Member

I'm getting 21 and 255...can someone tell me wer im goin wrong??

mini09
Active Participant

Hi vishal, you shouldn't be getting 255. Can you make a snippet of your code and share it.

s.vishal91
Member

numeric array functions.png

s.vishal91
Member

The array elements are same as given in the question..

s.vishal91
Member

sorry...got it...forgot make the array u8

s.vishal91
Member

But, can u explain me how?

crossrulz
Knight of NI

How what?  Please be more specific with your questions.

I think what you are seeing is the Add Array Elements and the Multiply Array Elements are working with a DBL floating point array.  So the results will be 21 and 720.  But the indicators are U8, so the 720 is being coerced to the maximum U8: 255.


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
s.vishal91
Member

Can you explain you earlier post?

crossrulz
Knight of NI

What part of it do you not undersand?


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

c