Jump to content

Code to divide a 4-bit signed binary number

Go to solution Solved by 79wjd,

Well thanks for all the helpful answers :unsure: 

 

Anyway, I figured it out....I just had to stop trying to thing of a way to code it in C++ and instead look at each individual bit in something like a truth table and then build the circuit. 

I'm looking over one of the practice test problems, and I have to design a circuit that divides a 4-bit signed binary number by 3. 

 

How would I go about doing it (in Verilog)? 

PSU Tier List | CoC

Gaming Build | FreeNAS Server

Spoiler

i5-4690k || Seidon 240m || GTX780 ACX || MSI Z97s SLI Plus || 8GB 2400mhz || 250GB 840 Evo || 1TB WD Blue || H440 (Black/Blue) || Windows 10 Pro || Dell P2414H & BenQ XL2411Z || Ducky Shine Mini || Logitech G502 Proteus Core

Spoiler

FreeNAS 9.3 - Stable || Xeon E3 1230v2 || Supermicro X9SCM-F || 32GB Crucial ECC DDR3 || 3x4TB WD Red (JBOD) || SYBA SI-PEX40064 sata controller || Corsair CX500m || NZXT Source 210.

Link to comment
https://linustechtips.com/topic/308905-code-to-divide-a-4-bit-signed-binary-number/
Share on other sites

Link to post
Share on other sites

I don't know how to answer this seriously or sarcastically...

 

 

This is against CoC, but you could try googling it? (If you haven't already)

Someone told Luke and Linus at CES 2017 to "Unban the legend known as Jerakl" and that's about all I've got going for me. (It didn't work)

 

Link to post
Share on other sites

I don't know how to answer this seriously or sarcastically...

 

 

This is against CoC, but you could try googling it? (If you haven't already)

I'm not understanding the issue :unsure:

 

Why is it against the CoC? (it's not an actual test problem, just a practice problem)....or are you saying, telling me to google is against the lmgtfy in the coc? 

PSU Tier List | CoC

Gaming Build | FreeNAS Server

Spoiler

i5-4690k || Seidon 240m || GTX780 ACX || MSI Z97s SLI Plus || 8GB 2400mhz || 250GB 840 Evo || 1TB WD Blue || H440 (Black/Blue) || Windows 10 Pro || Dell P2414H & BenQ XL2411Z || Ducky Shine Mini || Logitech G502 Proteus Core

Spoiler

FreeNAS 9.3 - Stable || Xeon E3 1230v2 || Supermicro X9SCM-F || 32GB Crucial ECC DDR3 || 3x4TB WD Red (JBOD) || SYBA SI-PEX40064 sata controller || Corsair CX500m || NZXT Source 210.

Link to post
Share on other sites

I'm not understanding the issue :unsure:

 

Why is it against the CoC? (it's not an actual test problem, just a practice problem) 

It's against CoC to suggest googling things. 

 

One particularly high/drunk mod gave me a warning point for it once. The OP was looking for an image. An image. The OP even said that was a good idea.

 

And yes I am 100% willing to call out mods for being stupid. I'm not afraid of warning points.

Someone told Luke and Linus at CES 2017 to "Unban the legend known as Jerakl" and that's about all I've got going for me. (It didn't work)

 

Link to post
Share on other sites

I don't know how to answer this seriously or sarcastically...

 

 

This is against CoC, but you could try googling it? (If you haven't already)

It's not against the CoC, LMGTFY is against the CoC

Link to post
Share on other sites

And yes I am 100% willing to call out mods for being stupid. I'm not afraid of warning points.

Well... Yeah. If they do something stupid call them out. 

 

The logic behind it though is to not tolerate it, even if it isn't malicious. If you tolerate it when one person does non-maliciously then a person that does it to be a dick can say "but he was allowed to!"

Link to post
Share on other sites

Well... Yeah. If they do something stupid call them out. 

 

The logic behind it though is to not tolerate it, even if it isn't malicious. If you tolerate it when one person does non-maliciously then a person that does it to be a dick can say "but he was allowed to!"

One time I called out a mod and ended up getting in trouble.

Someone told Luke and Linus at CES 2017 to "Unban the legend known as Jerakl" and that's about all I've got going for me. (It didn't work)

 

Link to post
Share on other sites

Well. That is fucking stupid.

And it wasn't in a public setting either. I messaged slick or something. I forget what I did about it. But it wasn't like I made a thread about it. I really dislike some of the mods here.

Someone told Luke and Linus at CES 2017 to "Unban the legend known as Jerakl" and that's about all I've got going for me. (It didn't work)

 

Link to post
Share on other sites

And it wasn't in a public setting either. I messaged slick or something. I forget what I did about it. But it wasn't like I made a thread about it. I really dislike some of the mods here.

Right.

 

I am neutral on most and like some. I haven't noticed any vibrant douchebaggery. 

Link to post
Share on other sites

Right.

 

I am neutral on most and like some. I haven't noticed any vibrant douchebaggery. 

I've experienced it twice or so.

Someone told Luke and Linus at CES 2017 to "Unban the legend known as Jerakl" and that's about all I've got going for me. (It didn't work)

 

Link to post
Share on other sites

Well thanks for all the helpful answers :unsure: 

 

Anyway, I figured it out....I just had to stop trying to thing of a way to code it in C++ and instead look at each individual bit in something like a truth table and then build the circuit. 

PSU Tier List | CoC

Gaming Build | FreeNAS Server

Spoiler

i5-4690k || Seidon 240m || GTX780 ACX || MSI Z97s SLI Plus || 8GB 2400mhz || 250GB 840 Evo || 1TB WD Blue || H440 (Black/Blue) || Windows 10 Pro || Dell P2414H & BenQ XL2411Z || Ducky Shine Mini || Logitech G502 Proteus Core

Spoiler

FreeNAS 9.3 - Stable || Xeon E3 1230v2 || Supermicro X9SCM-F || 32GB Crucial ECC DDR3 || 3x4TB WD Red (JBOD) || SYBA SI-PEX40064 sata controller || Corsair CX500m || NZXT Source 210.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×