20121013

NORTAL newsletter saying: Welcome, Ghalib

Ghalib, our new QA Consultant in Oman answered some traditional questions for the Meet & Greet section of the newsletter. Welcome, Ghalib!
How did you come to work at Nortal? And why Nortal?
One day, I visited the Knowledge Oasis, where the Nortal office is located, to meet some guys. During this visit, I heard positive news of Nortal from some guys who work in ITA (Information Technology Authority). I became curious to find the Nortal office and when I found it, I met the office manager Salma. I asked her for more details on Nortal and she gave me a web site address. Also, she advised me to apply for the positions that were listed online.

Then, I read more and more about the services Nortal is delivering in Oman, Qatar, Estonia and Serbia and I really liked the great work and I wanted to become a member of Nortal team. As I am Computer System and Network Engineer, I applied.

What do you do here?

I am a Junior QA Consultant and I am responsible for testing and discovering bugs. My task is to clearly define and localise any problems for the developers.

What drives you to work in this field?

As a software engineer, the QA is one of my dicpline. Quality assurance (QA) refers to the planned and systematic activities implemented in a quality system so that quality requirements for a product or service will be fulfilled. It has helped me be more creative in finding tricky ways to test the systems.  
What’s your educational background?

I have a Bachelor's Degree in Computer Networks and Systems Engineering from Sultan Qaboos University. I also concluded a 9-week-long training in Engineering Services MODES at Ministry of Defence which included maintaining network devices, monitoring network users and managing network security systems.
What do you do in your free time?
Play football, read books, play the guitar and go fishing.

If at all, what did you know about Estonia before coming to work at Nortal?
I know the capital of Estonia is Tallinn. One day, I will visit Estonia to know more about its culture.

20121002

Error Correcting Code..


 Error Correcting Code


The Application of computer software began to expand in several businesses and daily life, and that software requires significant components in order to get sufficient computer application. A memory is a one of those significant components. This mini-project comes to show how memory errors happened, how to detect these errors and how to correct them?. The mini-project idea is to explain function of Error Correcting Code (ECC). The main tasks of this mini-project will be done in four parts. The first part is showing memory system in computing machine, and then classifying memories. The second part is showing memory errors. The third part is explaining ways of errors detection in the ECC. The fourth part is going through errors correction in the ECC.


Chapter 1: Introduction
Memories are important hardware in any computing machine. It is used to hold data and instructions. Sometimes, errors occur in the data on the memory as a software problem. The solution of this problem must be software which can fix these errors. The software, which is required, is a code.

1.1  Computer Software
Software is a collection of computer programs that perform different tasks on a computer system. Computer software consists of a machine language that consists of groups of binary values, which specify processor instructions*.There are different types of computer software. The major types are:

1.      Programming Software: is one of the most commonly known and popularly used forms of computer software.
2.      System Software:  is a collection of operating systems; devise drivers, servers, windowing systems and utilities.
3.      Application Software: It enables the users to do specific tasks.
4.      Utility Software: helps in the management of computer hardware and application software.
5.      Data Backup and Recovery Software: preserve the original data and allow an easy retrieval of the backed up data.


Computer software are widely popular today and hence we cannot imagine a world of computers without them.
1.2  Objective of This Report
The objective of this reportis to highlight memory errors, errors detection and errors correction and also, to present functionality of errors correcting code (ECC). 

1.3  Why and where this project is useful
The errors correcting code (ECC) is a method used to detect and correct errors introduced during storage or transmission of data. Certain kinds of RAM chips inside a computer implement this technique to correct data errors and are known as ECC Memory. 

1.4  Report Structure
This report contains four chapters including the introduction. Each one of these chapters will be described in the following.Chapter two talks about the memory system, types of memories and memories errors. Chapter three talks about memory errors detection, correction and errors correcting code (ECC). Chapter four talks about ECC memory vs. non- ECC memory.

Chapter 2: Memory system
Memory system is the system where the computer holds the instructions that the processor executes and the data that those instructions work with. It consists of three main types of memories.


2.1  Memory types
Memory is one of main components on the computing machine. There are three types of memories. The first one is a read only memory (ROM) which can retain stored data when not powered. The second is a random access memory (RAM) which cannot retain stored data when not powered. The third is a special type of RAM is called cache memory.
2.1   Memory Errors
Memory is an electronic storage device, and all electronic storage devices have the potential to incorrectly return data different than what was originally stored. The data that is stored in the memory is bits and each bit ether a zero or a one.
There are two kinds of errors that can occur in a memory system. The first is called a hard error. It occurs when a piece of hardware is broken or is lost. During this error, computer system cannot work. Actually, the hard error is detected by the basic input/output system (BIOS) during boot process. The BIOS can detect the hard error but, it cannot fix it. The common message, which display on the computer monitor if there is a hard error, is shown in figure below.    

The second memory error is called a soft error. This occurs when a bit returns the wrong value. It occurs during storage processes. The soft errors are caucused by memory that is physically bad, poor quality of motherboards and memory system or other similar problems that are not related to the memory directly. In addition, the radioactivity that is come from materials used in PC systems can cause the soft error. This kind of error can be detected and fix it. Next chapters show that.

Chapter 3: Memory Errors Detection & Correction
Errors detection & correction are methods that are used to detect positions of wrong bits and to correct the detected wrong bits. Actually, the detection and correction are parts of a special code which is called Error Correcting Code (ECC).

3.1 Memory Errors Detection
There are many methods that are used for detecting. Parity checking is a simple method of detecting errors between data being written to computer memory and read back again. Parity checking examines each byte of data and sets a ninth bit, is known as a parity bit, to one if the number of ones is odd and zero if the number of ones is even. This means that a correct byte will always have an odd number of ones and if it does not, when the data is read back from memory, an error is reported. 



  1. 3.2 Memory Errors Correction



It is a method that is used to correct the reported errors. Hamming Code is the method of error detection and correction. It is used for correcting. It manages error correction on their own instead of going back and requesting the data source to resend the original data. These codes can correct single bit errors occurring in data. Multi-bit errors are very rare and hence do not pose much of a threat to memory systems. 

3.3 Error Correcting Code (ECC)
An error-correcting code is an algorithm of adding redundant data, or parity data, to data, such that it can be read back even when a number of errors occur, during the process of storage. The figure below shows simply how ECC work.
Chapter 4: ECC Memory vs. non- ECC Memory
Parity memory modules have an extra chip on them to check for errors. Therefore, non-parity memory should have an even number of chips on the module and parity memory should have an odd number. Typically, there will be 8 chips on a non-ECC module and 9 chips on an ECC module.

However, some parity SIMMs can have 12, 18, 24 or 36 chips. Therefore, a sure-fire way to determine of a memory module is parity or non-parity is to divide the number of chips on the module by three. If the number is evenly divisible by 3, it is a parity, or ECC module. If the number of chips is not divisible by three, the module is non-parity, or non-ECC.





 Conclusion:



At the end of this report, i thought the objectives are archieved. The computer memory is one of the important components of computer. There are two types of memory errors; hard error occurs when a piece of hardware is broken or is lost. There is a technical solution for this problem. Soft error is a second type, occurs when a bit returns the wrong value. It can be solved by using ECC.

References:
http://searchwindowsserver.techtarget.com/news/1073867/Error-correcting-code-memory-and-parity

















20120910

OpenSSH quick review

http://www.openssh.org/




OpenSSH stands for open source secure shell. It is a set of computer programs providing encrypted communication sessions over a computer network using the SSH protocol. OpenSSH was created by the OpenBSD team. It’s development is funded via donations. The last five versions of OpenSSH are:


·         OpenSSH 6.1: August 29, 2012
·         OpenSSH 6.0: April 22, 2012
·         OpenSSH 5.9: September 6, 2011
·         OpenSSH 5.8: February 4, 2011
·         OpenSSH 5.7: January 24, 2011


OpenSSHs’ principle:
OpenSSH provides a server daemon and client tools to facilitate secure, encrypted remote control and file transfer operations.
The OpenSSH server component, sshd, listens for client connections from any of the client tools. When a connection request occurs, sshd sets up the correct connection depending on the type of client tool connecting. For example, if the remote computer is connecting with the ssh client application, the OpenSSH server sets up a remote control session after authentication. If a remote user connects to an OpenSSH server, the OpenSSH server daemon initiates a secure copy of files between the server and client after authentication. OpenSSH can use many authentication methods, including password and public key.



Figure 1 Principle of OpenSSH

Installation:
Installation of the OpenSSH client and server applications is simple. To install the OpenSSH client applications on Ubuntu system, the following command is used at a terminal prompt:
sudo apt-get install openssh-client

To install the OpenSSH server application the following command is used at a terminal prompt:


sudo apt-get install openssh-server

Configuration:

Once OpenSSH has been installed. It can be configured by editing the sshd configuration file where locates at /etc/ssh/sshd_config. The following are examples of configuration directives you may change:
·         To set OpenSSH to listen on TCP port 2222 instead of the default TCP port 22, change the Port directive as such:
Port 2222
·         To have sshd allow public key-based login credentials, simply add or modify the line: PubkeyAuthentication yes

p /etc/ssh/     sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original
            sudo chmod a-w /etc/ssh/sshd_config.original

to effect the change using the following command at terminal prompt:
sudo /etc/init.d/ssh restart


Conclusion


OpenSSH encrypt communications between hosts over an insecure network, and it’s great for logging into and executing commands remotely. It’s also useful for port forwarding which allows us to securely tunnel arbitrary TCP connections and for secure file transfers using the SFTP protocol. 


find more details about OpenSSH









20120615

إضاءات من "رســــالة في الادارة المدارة"



كتاب رسالة في الادارة المدارة

للكاتب محمد بن سيف بن حمد المحروقي  



يتحدث الكاتب في كتابه هذا حول الادارة المدارة في سياق تعبيري للرسالة التي تطرق مجالا مؤثرا في الراي العام ايجابا أو سلبا أو جدلا والاختلاف في الراي لا يفسد للود قضية. يحمل الكتاب في جنباته نسمات يستنير المدير والمؤظف والاب والابن والمعلم والطالب في أي نظام او هيكلة ادارية. كل الشكر الى لما قدمة لنا من مادة وشكري ايضا موصول الى ابنه الاخ والصديق عماد صاحب كتاب "بهجة الانظار في أخبار ساكبية عمان". الجدير باذكر أن للكاتب محمد بن سيف المحروقي مجموعة من الكتب من بينها رسالة في سلوك المجتمع.. 

سوف اتطرق لإضاءات من هذه الرسالة لما لمسته منها نحو الصحوة للتنمية الادارية في المجتمع ونحو بناء منظومة متماسكة ترقى بالوضوح والشفافية ولما لهذه التنمية من عائد في تطوير الموارد البشرية والتنمية الاقتصادية ايضا. سوف اتناول الرسالة كما قسمها صاحبها  
وفرعتها الى ابواب كالتالي:  

بـاب: دائرة الادارة

على الانسان أن لايهاب ولايستذل أو يستضعف وعليه أن ينظر الى البواعث والدوافع التي تكمن وراء كل عمل. عند العزم على فعل شئ هيأله القوة والادارة وسعة التفكير وسداد الرأي. عندئذ تستقر القناعة الثابته في القلب وتطمن لها نفسه ونشط لها جوارحه.
يرى الكاتب والمفكر ان الافراز الحقيقي للايمان الصادق والعمل الصالح هو ثمرة جهد سابق استقرت في نفس شخصه. ويذكر الكاتب ايضا أنه لاداعي للندم على عمل الخير ولا يقلق على الاجر اذا لم يوفق في هذه العجالة بمقياس الناس ولم يتحقق في الارض فسوف يوفاه بميزان الله (أن الذين امنوا وعملوا الصالحات أنا لا نضيع أجر من أحسن عمل). يبعث الكاتب بين سطور كلماته نسمات وما أجملها لرسالة مجربة منه شخصيا حيث الطمأنيين والقناعة الذاتية محصلتها.  
في هذا الباب يستشهد المحروقي بأقوال القائد :
"أن الوظيفة تكليف ومسؤولية قبل أن تكون نفوذا أو سلطة"
ومن ثم قسم الانسان الى شخصين:
1-شخص عزيز (واقعي مثالي).
2- شخص بطران (محب لذاته).صــــ5ـــ
في نظر الكاتب أن التأثير الوجداني ينتج عنه إستجابة ذهنية تجلد وتبصر الشخص من الابتلاءات التي قد تواجهه. أن الحقيقة الراسخة للنفس الانسانية تقود العبد الى المواضبة على العلم والعمل بإعتدال الافكار والامال والتي إما أن يثاب أو يجازا على مقتظها.

باب:رحلة البحث عن مراتب التفاضل

رحل بنا المحروقي في هذا الباب نحو البحث عن مراتب التفاضل. حيث نوه حول الابتلاءات التي أظلمت العقول عن إدراكها وغفل عن ذكرها كالحوادث والوقائع والاستهانة والفساد. كما ينظر الكاتب الى أن البحث في الانسان والمسببات ليست من اللوازم الضرورية لاستيضاح ما غمض. وأنه لاسبيل لهم الى معرفة مدارك الشرع ولا استثناء فيما اجتمع عليه ووصف الكاتب هذا كله على انه خبث بالنفس ووصف هاؤلاء بأنهم لايعرفون للحياة هدف. وما يستنبطه القارئ أن الكاتب يريد في رسالته هذه أن يوضح أن البحث في الاسباب والمسببات ليست من منطقة الادارة وليست بالامر المستحب للمفاضلة بها بين الافراد.
والقارئ لمجموعة الرسائل يرى فنون الادب اللغوي لدى الكاتب والدبلوماسية الاجتماعية  التي استخدمها في النصح والتوجية والارشاد وايضا انتقى الالفاظ المعبرة بغير إسهاب. وكما هو معلوم أن الارشاد والنصح بالأوجز العبارات أبلغ وذات مفعول سحري وهو المحبب عند كل الاقران.
تذبذب الكفاءات غير قابله للتفاضل حيث الشك يحول من حولها والقيود التي تساور إلتزاماتها. أما الحياد فهي أعظم الغايات العمل وليست المعرفة كما يعتقد البعض. وكما أن بناء نظام إداري عملي يشمل منح الثقة للاخرين وتقديرهم والتسامح من مبادى الادارة الناجحة أيضا تدارس الاخطاء والعودة الى الحقيقة في جلاء ووضوح واستحكام العقل.

باب: المبادرات الذاتية وتنميتها

 بالفعل لايستطيع عقل الانسان أن يحيط بالكون، يمكن التوفيق بين متطلبات العصر والمتغيرات المحيطة بالفرد وذلك بتوفير محيط يحفز على الابداع حسب الاعمال التي يعتقد انه يستطيع إنجازها والرغبة في التمييز والابتكار وحب العمل وإخلاصه والتفاني فيه. والشعور بالتطوير مستوى الاداء والتعبير عن الافكار وصياغتها والمرونه عند طرحها وعدم تقييدها.
من أجمل المبادرات في تنمية الذات هي تفاعل الفرد مع ما اكتسبة من خبرات. والواجب أيضا من الفرد أن ينمي المعرفة والادراك وإختبارها على الواقع ونتيجة هذي المبادرة تنمية بواعث لرفع الروح المعنوية وكيفية تحسين ظروف العمل وتحيقيق الاهداف وتحديد الاولويات. ويرى الكاتب أن الشخصية التي تساعد على تجنب الروتين المتكرر المؤثر سلبا على التطوير الشامل بالشخصية المبدعة والمبادرة القادرة على الادارة الناجحة. نعم كل شخص قادر على الاعطاء والابداع والابتكار ولولا الحاجة لما ظهرت بوادر الابداع والابتكار. قد تكون هذي الحاجة مشكلة أو مساعدة بها تيسر ما ستعسر للانسانية. وعلى المبدع والمبتكر أن لا يغفل عن المعوقات والتحديات التي قد تواجهة أثناء ما يقوم به.
وكما يجب علينا كأفراد في هذا المجتمع أن لانرضخ لإثناء النفس عن عزيمتها ولا تقبل الفتور.نعود الى سطور الكاتب "إذ لا تكون التنمية الادارية حقيقة إلا اذا أشرفت على بنائها عقول وسواعد نشأت على القيم الكفيلة بالمحافظة على منجزاتها وحريصة كل الحرص على التعاون البناء وتعزيز الحوار وبناء توافق للاراء من أجل خدمة أهداف التنمية والادارة المستدامةوالعمل على إحراز تقدم حقيقي.."
لذا لزم صاحب الامر مساندة ودعم وإحترام تطلعات الجميع نحو الافضل كما يلزمه إعداد برنامج واستراتيجيات قادرة على الاستفادة من الروافد العملية للرقي بالموارد البشرية وبها ننال صداره الامم.

باب التفاضل العملي

حقيقة جميلة في مقدمة هذا الباب يشير إليها الكاتب بأن التنمية الادارية أداة اساسية لتحقيق التنمية الاقتصادية والاجتماعية والسياسية. وممالا شك فيه إختلاف القدرات بين الافراد أنفسهم قد يستوجب على المؤسسات إختيار المتقدمين لشغل احدى شواغر الوظيفية فيها. وهنا المفاضلة النظرية لاتكفى وحدها بل يضاف إليها المفاضلة العملية.مثالا ما تقوم به المؤسسات حيث أن المتقدم قد يخضع لسلسة من الاختبارات لاختيار الاكفى وفترة تدريسية علاوة على التقدير الذي ناله دراسيا.
ومن تجربة الكاتب الادارية الطويلة يوضح لنا أن ارتقاء المراتب والدرجات تاتي بتوظيف المواهب والقدرات وبذل الجهد الكبير للتمايز ويشير الى أن الرقابة الذاتية في النفس تنعكس إيجابيا بالمؤسسة مما يجعل رب العمل مطمأنا للذي يقدمه المراقب لذاته.
ويوضح ايضا الكاتب فكرة عامة لا يحق لاحد أن يحتفظ بها إلابقدار ما ينبغي وهذا يعلم المرء نفسه اثبات منطق الوجود القائم على حركة والهدف، حيث أن المرء في حركه دائمه يبذلها لتحقيق هدفه الذي رسمه. وعلميا ومن خلال النظرية النسبية أنه لاي جسم متحرك طاقة ولإي طاقة يبذل شغل. ومنها مقياسا بقدر ما يبذله المرء من جهد عملي ومعرفي لنيل الاماني وتحقيق الاهداف. ويمكن القول إجازا أن العمل يخفي وراءه روحا وفيه مخلصه قويه يغلفها الاتقان.
 ومن القواعد العامة للمسؤولية الوظيفية أو الاجتماعية التي تأتي طرديا عندما يسود التعامل الشريف والنزاهة وما يستوجب من مراعاة حسن النية مع المركز الوظيفي او الاجتماعي."فالمقدرة المؤهلة لايطلبها غير الاكفاء فالمجتمع الذي يسمح للكفاءات بالنبوغ حينما يصادف العمل موهبه فان الادارة تقترب بالقوة الدافعة للانجاز دون تواكل أو تردد فالحياة نظام ومبدأ عمل يحقق الفرد وجوده في المجتمع بالصورة التي يرى فيها ذاته ويتخذ لنفسه منهج حياة يقطع فيها كل عقبه كؤود وهكذا الناضج يدرك أبعاد المسافة التي عليه أن يقطعها فيركب الجد ويطرق أبواب الرفعه والمجد بعلمه وعمله فكان أن اَله إليه جل المناصب الرفيعه نتيجة الجهد المبذول.

بديهية الاسترشاد

الانسان المنطقي هو الذي يكيف نفسه مع حوله وينمى داخله احساسا بالثقة وان بإمكانه تنشيط الادراك الواعي للوصول الى وسيلة موثوقة للتعلم وأفضل استراتيجية في تحقيق النتائج المرجوه. والاداء الجيد هو الوسلية الادارية العملية الواقعية للشخص الذي يهوي الانجاز ويسعدنا بالحصول على التقييم للوصول الى المراد.

20120229

مداخلتي الهاتفية في إذاعة هلا FM لبرنامج للشباب رأيهم





الاذاعة: هلا FM
البرنامج: للشباب رأيهم 
الموضوع : دور الشباب العماني في البحث العلمي 
المحاور: الاستاذة باسمة الراجحي 
إخراج: الاستاذ نصر الحوسني 


تمثلة مداخلتي في النقاط التالية:

  • دعم الجامعة من بوابة الانشطة الطلابية نحو المشاريع العلمية.
  • الانجازات الملموسة مني التي تحققت بفضل دعم الجامعة.
  • دور والمبدأ الغير واضح التي تقوم بعض الموسسات والشركات نحو المشاريع العلمية.
للاستماع للمداخلة من هنــــــــــــــــــــــــا

تمت استضافتي ايضا على البرنامج نفسه في حوار دام قرابة ساعتين في نفس الموضوع على إستوديو الاذاعة.

20120226

Designing 8-bits Carry Look Ahead Circuit


The aim of this project is to Obtain logic diagram for a complete 8-bit binary adder/subtractor circuit based on carry look-ahead principle and to simulate the circuit in LogicWorks. They are not allowed us to use any of the carry look-ahead ICs/decoder/multiplexer available in LogicWorks library but to design the entire circuit lonely using gates only. It also include timing diagrams to prove that the designed circuit does addition/subtraction correctly for various input combinations.




 The design of CLA is successfully worked and checked by Dr. TariqJamel. 
 ========================================================

Designing
8-bits carry Look Ahead Circuit

                                                                                             
         Engr. Ghalib  Alhashmi    

      =======================================================

Table of Contacts


Chapter1: Introduction to Carry Look Ahead Adder/Subtractor (CLA)…………………….…1
Chapter2: Design 8-bits CLA (Adder/Subtracror)………………………………………….…2
2.1 Defining Problem…………………………………………………………….……3
2.1.1 The 8-bits Binary Addition and Subtraction……………………………………………………...…....………3
2.2 Design 8-bits CLA……….…………………...…………………………………..4
2.2.1 Truth Table……………….…………………………………………….4
2.2.2 K-map………....……………………………………………………….4
2.2.3 Design Using LogicWork software………....……………………………………5
Chapter3: CLA Simulation……...……………………………………………………………..6
3.1 Addition …………………....…………………………………………………….6
3.2 Subtraction………………………………………………………………………..7
Conclusion…………..………………………………………………………………………...9
References……..……………………………………………………………………………..10





=====================================================================



Chapter1: Introduction to Carry Look Ahead Adder/Subtractor CLA


The addition and subtraction both are arithmetic operations that are performed in the central processing unit (CPU). The arithmetic logical unit is a major part of performing them. There are various circuits that can perform those operations. The circuits are Carry look ahead (CLA), Binary parallel, BCD and other circuits.
Let Ai and Bi be addend, respectively, the outputs Si and Ci denote sum and while Ci denotes carry into the position i.
Col#
n-1
i
2
1
0
carry
Cn-1
Ci
C2
C1
C0

An-1
Ai
A2
A1
A0

Bn-1
Bi
B2
B1
B0





Sn
Sn-1
Si
S2
S1
S0
Last carry out









Figure 1.1 Simple circuit diagram of full adder


As shown in the Fig.1, the two internal signals Pi and Gi are given by:
Pi= Ai XOR Bi   …………………….. (1.1)
Gi= A AND Bi …….……………….. (1.2)
The output sum and carry can be determinate as:
Si=Pi  XOR Ci ………………………..(1.3)
Ci+1=Gi OR (Pi AND Ci) ……….. (1.4)
Where Pi is called carry propagation that can be produced by XORing Ai and Bi. Where Gi is called carry generate that can be produced from ANDing Ai and Bi. Both Pi and Gi only depend on the input Ai and Bi.
The i-bits carry look ahead (CLA) consists of 3 levels of logic:
Input: entering the input value of Ai and Bi in binary form. It may also consists XOR gate (with input Bi and C0) to change the operation (addition or subtarction).
First level: generate Pi and Gi signals. It consists of XOR gates and AND gates. The output signals from this level are P’s and G’s.
Second level: generate Ci signals as defined in expression (1.4). The output signals Ci come from ORing Gi and the outcome from ANDing Ci-1 and Pi. This level consists of OR and AND gates.
Third level: generate the sum signals Si. XOR gates are valid in this level.
Output: shown the output value in binary form.
Table 1.1: Number of gate in each level on CLA for i-bits input.
Gate
LEVEL 1
LEVEL 2
LEVEL 3
TOTAL
AND
i
i
0
2i
OR
0
i
0
i
XOR
i
0
I
2i

Table1.1 shows numbers of gates that are required to design CLA. From expressions (1),(2),(3) and (4), the number of AND gates is i ,if the input has i bits, in LEVEL1 also, LEVEL2 consists of i number of AND gates but LEVEL3 does not required any AND gate. The OR gate appear only in LEVEL2 with number of i. The XOR gates are required in LEVEL1 with i number of gate as well the same number on LEVEL3.
In this project, the CLA will be considered to design and implement addition and subtraction operations using LogicWork* software. The project will not implemented hardwarely.

Chapter2: Design 8-bits CLA (Adder/Subtracror)


Design is an important part, this chapter going through project design details. Designing 8-bits CLA consists of two parts. First part is defining problem clearly and then design and simulate using LogicWork.

 

2.1 Defining Problem


 Addition and subtraction are operations that are needed to design in this project. The carry look ahead principle is applied to them. The problem says: there are two inputs values for each value of them has 8 bites. 

2.1.1 The 8-bits Binary Addition and Subtraction

Let ( A=A7A6A5A4A3A2A1A0) and (B=B7B6B5B4B3B2B1B0) values each one of 8 bits are added. And let the result from this operation (S=S7S6S5S4S3S2S1S0) and let the carry that may be produced (C=C8C7C6C5C4C3C2C1). The C0 has two majors. It works as an input and mode (change the operations between addition and subtraction).
Col#
n-1
i
2
1
0
carry
Cn-1
Ci
C2
C1
C0

An-1
Ai
A2
A1
A0

Bn-1
Bi
B2
B1
B0





Sn
Sn-1
Si
S2
S1
S0

The maximum value of 8-bits is 28=256 when all the 8-bits filled by 1. When the 8-bits are 0’s, the value is the minimum.
(00000000)2 = (0)10 min-value
 (11111111)2 = (256)10 max-value
The result of any value of A that is added to min-value equals to A. in this case, S=A and C=0. Example2.1: add & subtract
Subtract:
A=11001100
B=10101010
S=00100010
S9=0
Add:
A=11001100
B=10101010
S=01110110
S9=1

Let       A=1100110011, B=10101010

C=10001000
C0=0
C0=1
C=10001000

 








2.2 Design 8-bits CLA

Truth table, Karnaugh map (K-map), Boolean expression and design are considered on this section.

2.2.1 Truth Table

The truth table is a way to find Boolean expression. Table 2.2.1 is used to determinate for both asthmatic operations addition/subtraction.
Table 2.2.1 Truth table for designing CLA
i
Ci Ai Bi
Ci+1Si
0
à000
00
1
     001
00
2
     010
01
3
     011
10
4
à100
01
5
     101
10
6
     110
10
7
     111
11

2.2.2 K-map

The K-map helps to get Boolean expression.
Table 2.2.2 K-map to get expression of Carry
Ci\AiBi
00
01
10
11
0
0
0
1
0
1
0
1
1
1

From Table 2.2.2, the carry can be expressed as:
Ci+1=AiBi+Ci(AiÅBi)…………(2.2.1)
Note: the current carry depends to pervious carry and the inputs values.
Table 2.2.3 K-map to get expression of sum
Ci\AiBi
00
01
10
11
0
0
1
0
1
1
1
0
1
0

From Table 2.2.3, the sum can be expressed as:
Si=Ci Å Ai Å Bi …………(2.2.2)

Let:
AiÅBi= Pi  ……………....(2.2.3)
And,
AiBi= Gi …………………..(2.2.4)
From expressions (2.2.3) and (2.2.3), the expressions (2.2.1) and (2.2.2) can be modified as:
Ci+1=Gi+CiPi ……………(2.2.5)
Si=Ci Å Pi ……………….(2.2.6)

2.2.3 Design Using LogicWork software


Figure 2.2.1 The final design of CLA using LogicWork software




Chapter3: CLA Simulation


The Figure 2.2.1 shows CLA which was completely tested and it worked functionally. In this chapter, the design will be tested and simulated for different type of values. Screen shots will be taken in each test.

3.1 Addition

Two testes are tried.
Note: at those testes the M=0.

3.1.1TEST 

ADD: 54 with 30
(54)10+ (30)10=(84)10=(00110110)2+(00011110)2 =(01010100)2




Figure 3.1.1 ADD:54,30 using CLA circuit (TEST3.1.1)


 3.1.2TEST 

ADD: 254 with 256
(254)10+ (255)10=(509)10=(111111110)2+(11111111)2 =(11111101)2 with carry out


Figure 3.1.2 ADD: 254 with 256 (TEST3.1.2)

 

 

3.2 Subtraction

Two testes are tried.
Note: at those testes the M=1.

3.2.2TEST 

SUB:54, 30
(54)10- (30)10=(24)10=(00110110)2-(00011110)2 =(00001000)2
Figure 3.2.1 SUB: 54, 30(TEST3.2.1)


3.2.2TEST 

SUB:254, 255
 (254)10 -(255)10=(-1)10=(111111110)2-(11111111)2 =(11111111)2’s=(00000001)2

    Figure3.2.2: SUB:254,255(TEST3.2.2)

Conclusion:

Solving problem, Designing, test and simulation have been conducted. The design of CLA is successfully worked and checked by Dr. Tariq Jamel.
This project helps me to understand one of the most important topics in course of Computer Organization and Architecture (ECCE5232. Moreover, good skills: search knowledge from books and World wild Web, solving problem, designing and testing errors can be added to me as an engineer.
If fact, the design requires 16 AND gates, 8 OR gates and 16 XOR gates. It is unlike the expansion technique (method that depends only on carry C0, Gi and Pi) which more gates. The expansion technique is fast but expansive comparing to other which is slower but cheap. The economic issue and fast machine are important factors that must be considered in any design. The design in this project is considered to be cheap and the fastness is not important in small circuit.
The improvements of the design are used expansion technique which is more reliable for a big circuit. Also, using IC’s chips (which consists more gates in one chip) is better than using single gate that did not found in the regular market.















References


[1] William Stallinge, Computer   Organization and Architecture, sixth edition
[2]Handout of course ECCE5232, 2011, by Dr.Tariq Jamel, SQU