Guidance on how to enable/disable specific buttons with a byte flag

I would like to enable/disable specific buttons based on inputs that have been changed in a form.

Instead of writing a ton of confusing if/else conditional statements, I would like to try and achieve this with a byte flag.

I think I'd set empty values to 0, and supplied values to 1. Something like this:

    ary = [], obj = {};
    ary = $('#form').serializeArray();

    $(ary).each(function(index, element){

        if (element.value) {

            obj[] = 1;
        } else {

            obj[] = 0;


And then I might do something like this:

    if ("1110") {
        //disable and enable specific buttons
    else if ("1010") {
        //disable and enable specific buttons

I've never done this before. Is this the correct strategy? Do you know of any simple examples or documentation to help get me started?