Question: ```
always@(a)
begin
#1 t<=a;
#1 c<=t;
end

```

I am analysing above verilog code with test bench as given below

```
   a=0;
#5 a=1;
#5 a=0;
#5 a=1;
#5;

```

Here is my analysis:
From above test bench I can tell that 'a' is a clock signal of total 20ns length with OFF and ON time of 5ns both respectively.At 0th ns, 'a' is changed from X to 0. So always block gets triggered.since first statement inside block is having 1ns inter delay, it waits for 1ns. after 1ns compiler gets to know that it is non blocking statement so just evaluation will be done not assignment.hence 'a' value will be stored as temporary and parallelly it executes second statement.since second one also has inter delay,it waits for 1ns. and then evaluation is done.since both the evaluations are done, assignment will happen now.

```
    time   a   t   c
    0ns    0   x   x
    1ns    0   x   x
    2ns    0   x   x
    3ns    0   0   x
    4ns    0   0   x

```

is this analysis correct?

Answer: 
made a few changes

notice the default case in the switch statement, also ensure that on of the checked box have a default value of true for the checked property.

```js
var unew;
$('input:radio[name=radios]').on('input', function () {
 var val = $(this).val();
  console.log(val);
 switch (val) {
  case 'false':
               unew = false;
  break;            
  case 'true':
               unew = true;
  break;
        default:
              /* Neither of the radio buttons are selected/checked*/
              /* Handle it your way */
        break;

 }
});
```

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
        <div class="col-md-4 mb-4">
          <label for="booking-age">Are you Agree</label>
     <div  class="p-0">
 <div class="btn-group btn-group-toggle my-1" data-toggle="buttons">
        <label for="radios-0" class="btn btn-secondary rounded-0">
          <input type="radio" name="radios" id="radios-0" value="true" >
          Yes
        </label>
        <label for="radios-1" class="btn btn-secondary rounded-0">
          <input type="radio" name="radios" id="radios-1" value="false" checked="true">
          No 
        </label>
      </div>
    </div>
        </div>
```
You can directly use an `if...else` condition instead of `switch...case`. Also, in the change event, the value can be accessed by `$(this).val()`

```js
var unew;
$('input:radio[name=radios]').on('change', function() {
  var val = $(this).val();
  console.log(val);
  if (val == 'true') { // case 'true' 
    unew = true;
  } else { //case 'false'   
    unew = false;
  }
  console.log(unew);
});
```

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="col-md-4 mb-4">
  <label for="booking-age">Are you Agree</label>
  <div class="p-0">
    <div class="btn-group btn-group-toggle my-1" data-toggle="buttons">
      <label for="radios-0" class="btn btn-secondary rounded-0">
          <input type="radio" name="radios" id="radios-0" value="true" >
          Yes
        </label>
      <label for="radios-1" class="btn btn-secondary rounded-0">
          <input type="radio" name="radios" id="radios-1" value="false" >
          No 
        </label>
    </div>
  </div>
</div>
```