Question: I am currently trying to figure out how to make the correct conversion from two's complement hexadecimal to its base 10 equivalent. We were given an assembly language program that adds and subtracts 32-bit integers and need to take the values of the registers and convert them. 

Here is what I've attempted, however, my professor says I've made a critical error in my final calculation and I have no clue what. 

Here is the register EAX value: FFFC0888

I then converted it from two's complement hexadecimal to hexadecimal:
FFFC0888 -> 0003F778

And finally converted the hexadecimal to decimal. 
0003F778 = (0 X 16^7) + (0 X 16^6) + (0 X 16^5) + (3 X 16^4) + (15 X 16^3) + (7 X 16^2) + (7 X 16^1) + (8 X 16^0) = 0+0+0+196608+61440+1792+112+8= **259960**

My final answer of 259960 is not correct, can someone please help enlighten me as to what I'm doing wrong? Thank you!

Answer: 
It is simple to add a subview to act as a line. For example:

Swift 4

```
var lineView = UIView(frame: CGRect(x: 0, y: 100, width: 320, height: 1.0))
lineView.layer.borderWidth = 1.0
lineView.layer.borderColor = UIColor.black.cgColor
self.view.addSubview(lineView)

```

Objective C

```
UIView * lineview = [[UIView alloc] initWithFrame:CGRectMake(0, 100,320,1)];
lineview.layer.borderColor = [UIColor blackColor].CGColor;
lineview.layer.borderWidth = 1.0;
[self.view addSubview:lineview];

```

Or you can refer to this link to add CALayer or draw a view

[how do you draw a line programmatically from a view controller?](https://stackoverflow.com/questions/16846413/how-do-you-draw-a-line-programmatically-from-a-view-controller)
For Swift 3:

```
        let lineView = UIView(frame: CGRect(x:0,
                                            y:  self.yourLabel.height - 1 ,
                                            width: self.yourLabel.frame.width,
                                            height: 1.4
                                           )
                             )

        lineView.backgroundColor = UIColor.blue
        self.yourLabel.addSubview(lineView)

```