Member Since: October 28, 2009

Country: United States



A graduate with a BS in Computer Engineering with a minor in Electrical Engineering. Working in Longmont for a prestigious silicon company as a DSV Engineer.

Students in EE/CE that have questions can email me at: s.r.grace[at]gmail.com. I will be more than happy to give you my knowledge and expertise. My main focus is on FPGA/Digital Logic and MCU systems, but I can help out in other areas.


Verificatoin Engineer


IEEE, PC Gamers

Spoken Languages


Programming Languages

MASM x86, C, C++, C#, SQL, Java (some), PHP, BASH, Batch File, HTML, HDL (VHDL/Verilog/SystemVerilog), Tcl.


University of Wyoming - BS in Computer Engineering, Minor Electrical Engineering


Embedded Systems Engineering, Digital Logic Design


Read expertise



  • A trick is that you can have embedded for-loops where only one loop has initialization and conditional happens in both:

    int i, j;
    for ( i = 0, j = 0; i < 16; ++i, j += 4) { ...
        for( ; i < 64; ++i) { ...} }

    If you haven’t guessed, this is from a version of SHA256.

    I don’t recommend doing this, but there are some advantages if a loop variable will be used in both loops and they will modify some data (in this case for SHA256, it is used in padding).

  • A few things from my experiences:

    1. When compilers convert the C/C++ to ASM, they will do things to optimize the pipeline of the instruction set. As an example, if you do if ( A == B) {..}, the compiler might actually do if (B != A) {…). (If you haven’t guessed, they’re the OPPOSITE of each other). This helps save on the JMP commands used (waiting a few clock cycles to go from one point of the ASM to another).
    2. Always have an “else” statement. This goes along my digital logic background that it creates latches if you don’t have a “default” conditional, and if you don’t have one, that means your conditionals have to handle ALL possible conditions, and if you don’t know the conditions of the data, have an else there to save you the headache of losing data, and possibly having improper data print out.
    3. If you have far too many if-statements in a row, you should look into using a switch/case to simplify your code (and helps the compiler optimize it).

    My biggest issue with the homework of online classes is they do not show you the bigger picture of when to use certain key features of the language. Why use an if-statement, when a unary/ternary statement can do the same thing? The times I learned a language the best was when I was given a practical application in which to code. This helps teach the specific aspects of the syntax you want to teach, but also teaches the students to test their code. Plus, as they get more familiar with the code and application, they can start doing coding optimizations themselves to meet certain specifications of the design.

  • Connecting to any “free wifi” should be done through a VPN.

  • A little “gotcha” the pre and post increment statements: http://stackoverflow.com/a/4706239

  • Some more FYI, the processor instruction set size (8-bit, 16-bit, 32-bit, 64-bit) determines the initial datatype size.

    This means that some things which are larger (float, double) would have reduced size from what they typical are (float = 32-bit, double = 64-bit), so if floating point resolution is a major desire, keep that in mind.

  • I want to add a comment related to learning other languages. Learning coding languages is like learning a foreign language, you have to learn the RULES of the language to understand how to format your phrases. Same thing with the syntax of a coding language. If you start off with C/C++ based syntax, learn all of the languages that are similar in syntax!

    For example, you are learning C/C++, and now you are wanting to go to FPGAs, your logical step should be to Verilog/SystemVerilog. This is because it syntactically similar to C/C++.

    Just my 2 cents.

  • I know these are the “top competitors” in the market, but there’s a lot of companies out there vying to have a stake in IoT.

    Besides the above, you got Nokia, Ericsson, Google, Facebook, Qualcomm, etc. The problem is, every company is trying to be the “go-to” for something specific in IoT. Some want to be the complete solution, others want their products used a consumer product.

  • Yes.

  • VapeNation

  • Yeah, I dabbled in the network stuff in college (and for IT positions also in college). My knowledge of that stuff is limited so I do a lot of Googling on proper things. I do know pfSense has a great book that you can buy that will tell you things in simple terms on what to do.