﻿ Add signed negative numbers example.      Custom Search Chip Designing for ASIC/ FPGA Design engineers and Students
FULLCHIPDESIGN
Digital-logic Design...  Dream for many students… start learning front-end…
@TYH :- 4G LTE Long Term Evolution Tutorial, CloudComputing Get Noticed:- Submit your own content to be published on fullchipdesign.com

Send it to fullchip@gmail.com

EX1:  -7,  -6 : Two negative numbers.

Step 1: Convert to 2's complement for negative numbers.

-7 (in Binary 4’b1111) = 1 001, save msb as sign bit and convert lower 3 bits into 2’s complement.

-6 (in Binary 4’b1110) = 1 010, save msb as sign bit and convert lower 3 bits in 2’s complement.

Signed number addition of two negative numbers and overflow condition.

Step 2: Add & store the result in sum register 5 bits wide.

1 001

1 010

-----------

1 0 011

-----------

Step 3: No carry into signed bit but carry out of signed bit. In this scenario keep MSB as sign and take 2’s complement of lower 4 bits.

Result: 5’b1 1101 = 0x1D = -13

Summary in table below

 Values Observations 2 bit Binary representation for  carry in,  carry out Use Bit as sign for overflow Bit as sign, value, 2’s complement. Bit[2:0] as value or 2’s complement. -7 -6 No carry into signed bit but carry out of signed bit. 01 Yes Bit =1 so take 2’s complement. Bit = 1 so take 2’s complement. Solved Examples for 3 variable Kmaps
1. F(x,y,z) =     (0,1,6,7) - Minimization, on this page.
2. F(x,y,z) =     (0,1,4,5,6,7) - Minimization from here.
3. F(x,y,z) =     (3,4,6,7) - Minimization from here.
4. F(x,y,z) =     (0,1,2,3,4,5,6,7) - Minimization from here. Resources
Verilog RTL code examples for front-end chip design.
Digital Design Topics
Stack Organization - LIFO, RPN
RTL coding guidelines. ICG cell, Assertions, , levelsChandle
Pipeline vs. Parallel processing.

(valid for most EDA flows)

How to implement a(ICG) cell from vendor library.

Interview Questions. Main, FPGA, Digital Fundamentals
LTE - Long Term Evolution topics from here