The Daily CLAD

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

CLAD2017 - Answer the requirement: Find those ones

Active Participant

You are tasked with writing a VI that searches an input array of U8 numeric values (Data Array In) and identifies which elements within that array contain values that have one or more of the same BITs set to B'1' as those in a match U8 numeric (Match Value) .  Elements in the input array that have one or more of the same BITs set to B'1' as those in the match numeric should be added to a U8 array returned by the VI (Matched Elements Array Out).  Which of the following VIs does NOT satisfy those requirements?

 

Example: If the Match Value = 5 (B'00000101) only elements from Data Array In with BIT2 and/or BIT0 set to B'1' should be included in Matched Elements Array Out.

 

Have a go at coding a VI yourself or expand the Spoiler tag to see the answer options:

 

Spoiler

a)

Match Ones #1.png

 

 

 

b)

Match Ones #2.png

 

 

c)

Match Ones #3.png

 

d)

Match Ones #4.png

 

 

Combined.png

Comments
Knight of NI

C


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Member

I like A for this one (unless I'm not understanding the problem well). It's exactly how I made it before looking at the options.

Active Participant

Hi ARL00000000000000 (hope I spelt that correctly).  Have another read of the question, it is a variation on the normal theme.

Combined.png

Member

LOL... I totally missed the (very clearly highlighted) "NOT satisfy", I was thinking how on earth is "C" possibly correct?

 

So yes, "C" is most certainly not going to satisfy the requirement.

Member

C

 

Took a while to figure out, but I finally understand it!

Member

C

NI Employee

c)

Member

C.  I needed some time, more than my morning check of the blog, to digest this one.  Is this similar to a "new" CLAD question? 

Active Participant

I haven't seen a find the one that doesn't satisfy the requirements type question, but why not. What I am more interested in is, is it your final answer?

Combined.png

Member

c

Member

C

Active Participant

Answer: C.  Nice one all.

Combined.png

Member

Can anyone please explain the Difference between C & D in detail? Exactly where the difference will occur to get matched element in D not C?

Member

C is comparing every element of the U8 to a single bit from the Match value.  D is comparing every element of the U8 to every element of the match value.  See where the auto indexing terminal are?

Certified LabVIEW Architect