• Simplified Chinese
  • Japanese
  • Korean
   
Home > Cypress Developer Community > Blogs > Dave's Corner: The Dave Van Ess Blog


Dave's Corner: The Dave Van Ess Blog
Apr 30, 2012

 You guys got were pretty quick.  This algorithm produces the rounded integer square root value..

 

Given a value y = n the sum would be the sum of the term doubled would be

 sum (0, 2, 4, 6 .......2(n-1))  = n^2 -n = (n - 1/2)^2 -1/4

 So

x >  (n-1/2)^2

The fact that y = n+1 is too large means

 (n-1/2)^2  < x < (n+1/2)^2

So y must be the rounded integer value of the square root of x.

 

Although slow, it is an easy algorithm to implement. Shifting x left two bits will result in y having an extra bit of resolution.  Sqrt(2 *256)/16 =  1.4375

 

I will be sending -050s to hli and Arther when they send me their contact information.

I can be reached at dwv*spamblock*@cypress.com

Rating: Be the first to rate
Comments (1)
Apr 27, 2012

It has been some time since I have given something away.  So I think it is time for another contest.  This time you are competing for a PSoC 5 DEV KIT  (-050). First to answer correctly wins!

 The function y = f(x) where both x and y are integers and x is a non negative value.

 The function is implemented with the following code;

 Given a non negative integer x:

 

    for(y = 0; x > 2*y; x -= 2*y++);

 

1) What is this function?

2) Prove it works for all non negative values of x.

3) What is the answer for a negative value of x?

Rating: Be the first to rate
Comments (7)
Apr 18, 2012

I wrote about this in my latest column (http://electronicdesign.com/article/analog-and-mixed-signal/robust-career-73753) and I was wondering how many of you have been asked to compromise yourself (either professionally or ethically) while employed for someone.   How did you handle it.  I would like to know.  So would other readers.  I would also appreciate any feedback on this column.

Rating: Be the first to rate
Comments (1)
Apr 18, 2012

I wrote about this in my latest column (http://electronicdesign.com/article/analog-and-mixed-signal/robust-career-73753) and I was wondering how many of you have been asked to compromise yourself (either professionally or ethically) while employed for someone.   How did you handle it.  I would like to know.  So would other readers.  I would also appreciate any feedback on this column.

Rating: Be the first to rate
Comments (0)
Apr 03, 2012

I am in Cambridge (not Bass-ton) to visit MIT.  In 1888 Charles and Henry Greene studied at the MIT School of Architecture and went out west to become pivotal leaders in the West Coast style of Arts and Crafts Architecture.  Although not considered part of the California bungalow school, their work was a big influence on the California designers.  I am staying in Cambridge and when I went to dinner I took a walk in an older neighborhood.  As a walked around I could see houses that showed some of the influences the MIT school had on the Greens.  (Heavy use of wood shingle siding, simpler lines, a move away from Victorian gingerbread and overt bay windows.)  It became apparent to me how much influence the MIT School of Architecture had on a whole design style 3000 lies away.  It was like seeing an architecture missing link.  At a time that most Architects went to Europe to study, the Greens learned a different American style.

 

I like to think that we, at Cypress, are developing a while new style of design and our work will have significant impact on the direction of future system design.  30 years from now it will be interesting to have people look back at our work and say, Those Cypress guys really knew their stuff!

Rating: Be the first to rate
Comments (0)
ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

 
 
FB1.png Twitter1.png linkedin youtube