# 4 bit binary counter with flip flop

**URL:** https://forum.xod.io/t/4-bit-binary-counter-with-flip-flop/4794
**Category:** XOD Programming Questions
**Created:** [January 19, 2021, 6:58pm UTC](https://forum.xod.io/t/4-bit-binary-counter-with-flip-flop/4794 "2021-01-19T18:58:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![privateloki11](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@privateloki11](https://forum.xod.io/u/privateloki11)
#### Post date: [January 19, 2021, 6:58pm UTC](https://forum.xod.io/t/4-bit-binary-counter-with-flip-flop/4794/1 "2021-01-19T18:58:58Z")

</div>

Can someone please help me build a 4 bit binary counter, I am very new this XOD please help me…

---

<div class="post-metadata">

### Author: ![gweimer](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@gweimer](https://forum.xod.io/u/gweimer)
#### Post date: [January 20, 2021, 12:58am UTC](https://forum.xod.io/t/4-bit-binary-counter-with-flip-flop/4794/2 "2021-01-20T00:58:15Z")

</div>

You give half the answer in your title. Using 4 flip-flops gives you 4 bits of storage. Pulsing the TGL pin on the first flip-flop increments your count by one. The second flip-flop-TGL pin should only pulse when the first flip-flop turns off, so the first flip-flop-MEM should link to a pulse-on-false node, then to the second flip-flop-TGL pin. Repeat for the 2 remaining flip-flops to get 4 bits of counting.

---

<div class="post-metadata">

### Author: ![privateloki11](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@privateloki11](https://forum.xod.io/u/privateloki11)
#### Post date: [January 20, 2021, 7:29pm UTC](https://forum.xod.io/t/4-bit-binary-counter-with-flip-flop/4794/4 "2021-01-20T19:29:47Z")

</div>

Alright thank you it helped.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/eb7348baa04192c2ef932d1db54d44f09f8a7888.png) [@system](https://forum.xod.io/u/system)
#### Post date: [January 22, 2021, 7:29pm UTC](https://forum.xod.io/t/4-bit-binary-counter-with-flip-flop/4794/5 "2021-01-22T19:29:47Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
